# Type Alias rustc_middle::ty::predicate::PolyProjectionPredicate

source ·

    pub type PolyProjectionPredicate<'tcx> = Binder<'tcx, ProjectionPredicate<'tcx>>;

## Aliased Type§

    struct PolyProjectionPredicate<'tcx> {
        value: ProjectionPredicate<'tcx>,
        bound_vars: &'tcx RawList<(), BoundVariableKind>,
    }

## Fields§

§`value: ProjectionPredicate<'tcx>`§`bound_vars: &'tcx RawList<(), BoundVariableKind>`

## Implementations§

source§

### impl<'tcx> PolyProjectionPredicate<'tcx>

source

#### pub fn trait_def_id(&self, tcx: TyCtxt<'tcx>) -> DefId

Returns the `DefId` of the trait of the associated item being projected.

source

#### 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.

source

#### pub fn term(&self) -> Binder<'tcx, Term<'tcx>>

source

#### 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> for PolyProjectionPredicate<'tcx>

source§

#### fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx>

source§

### impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx>

source§

#### fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Clause<'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