Type Definition rustc_middle::ty::PolyProjectionPredicate
source · [−]pub type PolyProjectionPredicate<'tcx> = Binder<'tcx, ProjectionPredicate<'tcx>>;
Implementations
sourceimpl<'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
sourceimpl<'tcx> ToPredicate<'tcx> for PolyProjectionPredicate<'tcx>
impl<'tcx> ToPredicate<'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