Enum rustc_middle::ty::PredicateKind[][src]

pub enum PredicateKind<'tcx> {
    Trait(TraitPredicate<'tcx>, Constness),
    ClosureKind(DefIdSubstsRef<'tcx>, ClosureKind),
    ConstEvaluatable(WithOptConstParam<DefId>, SubstsRef<'tcx>),
    ConstEquate(&'tcx Const<'tcx>, &'tcx Const<'tcx>),


Trait(TraitPredicate<'tcx>, Constness)

Corresponds to where Foo: Bar<A, B, C>. Foo here would be the Self type of the trait reference and A, B, and C would be the type parameters.

A trait predicate will have Constness::Const if it originates from a bound on a const fn without the ?const opt-out (e.g., const fn foobar<Foo: Bar>() {}).


where 'a: 'b


where T: 'a


where <T as TraitRef>::Name == X, approximately. See the ProjectionPredicate struct for details.


No syntax: T well-formed.


Trait must be object-safe.

ClosureKind(DefIdSubstsRef<'tcx>, ClosureKind)

No direct syntax. May be thought of as where T: FnFoo<...> for some substitutions ... and T being a closure type. Satisfied (or refuted) once we know the closure’s kind.


T1 <: T2

ConstEvaluatable(WithOptConstParam<DefId>, SubstsRef<'tcx>)

Constant initializer must evaluate successfully.

ConstEquate(&'tcx Const<'tcx>, &'tcx Const<'tcx>)

Constants must be equal. The first component is the const that is expected.


Represents a type found in the environment that we can use for implied bounds.

Only used for Chalk.

Trait Implementations

impl<'tcx> Clone for PredicateKind<'tcx>[src]

impl<'tcx> Copy for PredicateKind<'tcx>[src]

impl<'tcx> Debug for PredicateKind<'tcx>[src]

impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for PredicateKind<'tcx>[src]

impl<'tcx> Display for PredicateKind<'tcx>[src]

impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for PredicateKind<'tcx>[src]

impl<'tcx, E: TyEncoder<'tcx>> EncodableWithShorthand<'tcx, E> for PredicateKind<'tcx>[src]

type Variant = PredicateKind<'tcx>

impl<'tcx> Eq for PredicateKind<'tcx>[src]

impl<'tcx> Hash for PredicateKind<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for PredicateKind<'tcx>[src]

impl<'a, 'tcx> Lift<'tcx> for PredicateKind<'a>[src]

type Lifted = PredicateKind<'tcx>

impl<'tcx> PartialEq<PredicateKind<'tcx>> for PredicateKind<'tcx>[src]

impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for PredicateKind<'tcx>[src]

type Output = P

type Error = Error

impl<'tcx> StructuralEq for PredicateKind<'tcx>[src]

impl<'tcx> StructuralPartialEq for PredicateKind<'tcx>[src]

impl<'tcx> ToPredicate<'tcx> for PredicateKind<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for PredicateKind<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for PredicateKind<'tcx>

impl<'tcx> !Send for PredicateKind<'tcx>

impl<'tcx> !Sync for PredicateKind<'tcx>

impl<'tcx> Unpin for PredicateKind<'tcx>

impl<'tcx> !UnwindSafe for PredicateKind<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<'a, T> Captures<'a> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]