Type Alias rustc_middle::ty::PolyProjectionPredicate
source · pub type PolyProjectionPredicate<'tcx> = Binder<'tcx, ProjectionPredicate<'tcx>>;
Aliased Type§
struct PolyProjectionPredicate<'tcx> {
value: ProjectionPredicate<'tcx>,
bound_vars: &'tcx List<BoundVariableKind>,
}
Fields§
§value: ProjectionPredicate<'tcx>
§bound_vars: &'tcx List<BoundVariableKind>
Implementations§
source§impl<'tcx> PolyProjectionPredicate<'tcx>
impl<'tcx> PolyProjectionPredicate<'tcx>
sourcepub fn trait_def_id(&self, tcx: TyCtxt<'tcx>) -> DefId
pub fn trait_def_id(&self, tcx: TyCtxt<'tcx>) -> DefId
Returns the DefId
of the trait of the associated item being projected.
sourcepub fn required_poly_trait_ref(&self, tcx: TyCtxt<'tcx>) -> PolyTraitRef<'tcx>
pub fn required_poly_trait_ref(&self, tcx: TyCtxt<'tcx>) -> PolyTraitRef<'tcx>
Get the PolyTraitRef required for this projection to be well formed. Note that for generic associated types the predicates of the associated type also need to be checked.
pub fn term(&self) -> Binder<'tcx, Term<'tcx>>
sourcepub fn projection_def_id(&self) -> DefId
pub fn projection_def_id(&self) -> DefId
The DefId
of the TraitItem
for the associated type.
Note that this is not the DefId
of the TraitRef
containing this
associated type, which is in tcx.associated_item(projection_def_id()).container
.
Trait Implementations§
source§impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx>
impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx>
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Clause<'tcx>
source§impl<'tcx> ToPredicate<'tcx, Predicate<'tcx>> for PolyProjectionPredicate<'tcx>
impl<'tcx> ToPredicate<'tcx, Predicate<'tcx>> for PolyProjectionPredicate<'tcx>
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes