Enum rustc_trait_selection::infer::canonical::CanonicalVarKind [−][src]
pub enum CanonicalVarKind<'tcx> {
Ty(CanonicalTyVarKind),
PlaceholderTy(Placeholder<BoundVar>),
Region(UniverseIndex),
PlaceholderRegion(Placeholder<BoundRegionKind>),
Const(UniverseIndex),
PlaceholderConst(Placeholder<BoundConst<'tcx>>),
}
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
Some kind of type inference variable.
Tuple Fields of Ty
PlaceholderTy(Placeholder<BoundVar>)
A “placeholder” that represents “any type”.
Tuple Fields of PlaceholderTy
0: Placeholder<BoundVar>
Region(UniverseIndex)
Region variable '?R
.
Tuple Fields of Region
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
.
Tuple Fields of PlaceholderRegion
Const(UniverseIndex)
Some kind of const inference variable.
Tuple Fields of Const
PlaceholderConst(Placeholder<BoundConst<'tcx>>)
A “placeholder” that represents “any const”.
Tuple Fields of PlaceholderConst
0: Placeholder<BoundConst<'tcx>>
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for CanonicalVarKind<'tcx>
impl<'tcx> !Send for CanonicalVarKind<'tcx>
impl<'tcx> !Sync for CanonicalVarKind<'tcx>
impl<'tcx> Unpin for CanonicalVarKind<'tcx>
impl<'tcx> !UnwindSafe for CanonicalVarKind<'tcx>
Blanket Implementations
pub fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]
Mutably borrows from an owned value. Read more
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
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
: 4 bytesPlaceholderConst
: 28 bytes