Enum rustc_infer::infer::canonical::CanonicalVarKind
source · [−]pub enum CanonicalVarKind<'tcx> {
Ty(CanonicalTyVarKind),
PlaceholderTy(Placeholder<BoundVar>),
Region(UniverseIndex),
PlaceholderRegion(Placeholder<BoundRegionKind>),
Const(UniverseIndex, &'tcx TyS<'tcx>),
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
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, &'tcx TyS<'tcx>)
Some kind of const inference variable.
PlaceholderConst(Placeholder<BoundConst<'tcx>>)
A “placeholder” that represents “any const”.
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
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for T where
T: Copy,
pub fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
pub fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'tcx, T> Subst<'tcx> for T where
T: TypeFoldable<'tcx>,
impl<'tcx, T> Subst<'tcx> for T where
T: TypeFoldable<'tcx>,
pub fn subst_spanned(
self,
tcx: TyCtxt<'tcx>,
substs: &[GenericArg<'tcx>],
span: Option<Span>
) -> T
fn subst(self, tcx: TyCtxt<'tcx>, substs: &[GenericArg<'tcx>]) -> Self
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
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