Enum rustc_infer::infer::canonical::CanonicalVarKind
source · [−]pub enum CanonicalVarKind<'tcx> {
Ty(CanonicalTyVarKind),
PlaceholderTy(Placeholder<BoundVar>),
Region(UniverseIndex),
PlaceholderRegion(Placeholder<BoundRegionKind>),
Const(UniverseIndex, &TyS),
PlaceholderConst(Placeholder<BoundConst>),
}Expand description
Describes the “kind” of the canonical variable. This is a “kind” in the type-theory sense of the term – i.e., a “meta” type system that analyzes type-like values.
Variants
Ty(CanonicalTyVarKind)
Some kind of type inference variable.
PlaceholderTy(Placeholder<BoundVar>)
A “placeholder” that represents “any type”.
Region(UniverseIndex)
Region variable '?R.
PlaceholderRegion(Placeholder<BoundRegionKind>)
A “placeholder” that represents “any region”. Created when you
are solving a goal like for<'a> T: Foo<'a> to represent the
bound region 'a.
Const(UniverseIndex, &TyS)
Some kind of const inference variable.
PlaceholderConst(Placeholder<BoundConst>)
A “placeholder” that represents “any const”.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for CanonicalVarKind
impl<'tcx> Send for CanonicalVarKind
impl<'tcx> Sync for CanonicalVarKind
impl<'tcx> Unpin for CanonicalVarKind
impl<'tcx> !UnwindSafe for CanonicalVarKind
Blanket Implementations
Mutably borrows from an owned value. Read more
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:
Ty: 4 bytesPlaceholderTy: 8 bytesRegion: 4 bytesPlaceholderRegion: 20 bytesConst: 12 bytesPlaceholderConst: 28 bytes