ExistentialPredicate in rustc_middle::ty - Rust
Description: API documentation for the Rust `ExistentialPredicate` type in crate `rustc_middle`.

Skip to main content

## ExistentialPredicate

# Type Alias ExistentialPredicate

Source

    pub type ExistentialPredicate<'tcx> = ExistentialPredicate<TyCtxt<'tcx>>;

## Aliased Type§

    pub enum ExistentialPredicate<'tcx> {
        Trait(ExistentialTraitRef<TyCtxt<'tcx>>),
        Projection(ExistentialProjection<TyCtxt<'tcx>>),
        AutoTrait(DefId),
    }

## Variants§

§

### Trait(ExistentialTraitRef<TyCtxt<'tcx>>)

E.g., `Iterator`.

§

### Projection(ExistentialProjection<TyCtxt<'tcx>>)

E.g., `Iterator::Item = T`.

§

### AutoTrait(DefId)

E.g., `Send`.

## Trait Implementations§

Source§

### impl<'tcx> ExistentialPredicateStableCmpExt<'tcx> for ExistentialPredicate<'tcx>

Source§

#### fn stable_cmp(&self, tcx: TyCtxt<'tcx>, other: &Self) -> Ordering

Compares via an ordering that will not change if modules are reordered or other changes are made to the tree. In particular, this ordering is preserved across incremental compilations.

Source§

### impl<'tcx, P: PrettyPrinter<'tcx>> Print<P> for ExistentialPredicate<'tcx>

Source§

#### fn print(&self, p: &mut P) -> Result<(), PrintError>

## Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.