Type Alias rustc_middle::ty::ClauseKind
source · pub type ClauseKind<'tcx> = ClauseKind<TyCtxt<'tcx>>;
Aliased Type§
enum ClauseKind<'tcx> {
Trait(TraitPredicate<'tcx>),
RegionOutlives(OutlivesPredicate<Region<'tcx>, Region<'tcx>>),
TypeOutlives(OutlivesPredicate<Ty<'tcx>, Region<'tcx>>),
Projection(ProjectionPredicate<'tcx>),
ConstArgHasType(Const<'tcx>, Ty<'tcx>),
WellFormed(GenericArg<'tcx>),
ConstEvaluatable(Const<'tcx>),
}
Variants§
Trait(TraitPredicate<'tcx>)
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.
RegionOutlives(OutlivesPredicate<Region<'tcx>, Region<'tcx>>)
where 'a: 'b
TypeOutlives(OutlivesPredicate<Ty<'tcx>, Region<'tcx>>)
where T: 'a
Projection(ProjectionPredicate<'tcx>)
where <T as TraitRef>::Name == X
, approximately.
See the ProjectionPredicate
struct for details.
ConstArgHasType(Const<'tcx>, Ty<'tcx>)
Ensures that a const generic argument to a parameter const N: u8
is of type u8
.
WellFormed(GenericArg<'tcx>)
No syntax: T
well-formed.
ConstEvaluatable(Const<'tcx>)
Constant initializer must evaluate successfully.
Trait Implementations§
source§impl ParameterizedOverTcx for ClauseKind<'static>
impl ParameterizedOverTcx for ClauseKind<'static>
type Value<'tcx> = ClauseKind<TyCtxt<'tcx>>
source§impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ClauseKind<'tcx>
impl<'tcx, P: PrettyPrinter<'tcx>> Print<'tcx, P> for ClauseKind<'tcx>
source§impl<'tcx> ToPredicate<'tcx> for ClauseKind<'tcx>
impl<'tcx> ToPredicate<'tcx> for ClauseKind<'tcx>
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx>
source§impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for ClauseKind<'tcx>
impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for ClauseKind<'tcx>
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
Size for each variant:
Trait
: 24 bytesRegionOutlives
: 16 bytesTypeOutlives
: 16 bytesProjection
: 24 bytesConstArgHasType
: 16 bytesWellFormed
: 8 bytesConstEvaluatable
: 8 bytes