Enum rustc_middle::infer::canonical::CanonicalVarKind
source · pub enum CanonicalVarKind<I>where
I: Interner,{
Ty(CanonicalTyVarKind),
PlaceholderTy(<I as Interner>::PlaceholderTy),
Region(UniverseIndex),
PlaceholderRegion(<I as Interner>::PlaceholderRegion),
Const(UniverseIndex, <I as Interner>::Ty),
Effect,
PlaceholderConst(<I as Interner>::PlaceholderConst, <I as Interner>::Ty),
}
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(<I as Interner>::PlaceholderTy)
A “placeholder” that represents “any type”.
Region(UniverseIndex)
Region variable '?R
.
PlaceholderRegion(<I as Interner>::PlaceholderRegion)
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, <I as Interner>::Ty)
Some kind of const inference variable.
Effect
Effect variable '?E
.
PlaceholderConst(<I as Interner>::PlaceholderConst, <I as Interner>::Ty)
A “placeholder” that represents “any const”.
Auto Trait Implementations§
impl<I> DynSync for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: DynSync, <I as Interner>::PlaceholderRegion: DynSync, <I as Interner>::PlaceholderTy: DynSync, <I as Interner>::Ty: DynSync,
impl<I> RefUnwindSafe for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: RefUnwindSafe, <I as Interner>::PlaceholderRegion: RefUnwindSafe, <I as Interner>::PlaceholderTy: RefUnwindSafe, <I as Interner>::Ty: RefUnwindSafe,
impl<I> Send for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: Send, <I as Interner>::PlaceholderRegion: Send, <I as Interner>::PlaceholderTy: Send, <I as Interner>::Ty: Send,
impl<I> Sync for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: Sync, <I as Interner>::PlaceholderRegion: Sync, <I as Interner>::PlaceholderTy: Sync, <I as Interner>::Ty: Sync,
impl<I> Unpin for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: Unpin, <I as Interner>::PlaceholderRegion: Unpin, <I as Interner>::PlaceholderTy: Unpin, <I as Interner>::Ty: Unpin,
impl<I> UnwindSafe for CanonicalVarKind<I>where <I as Interner>::PlaceholderConst: UnwindSafe, <I as Interner>::PlaceholderRegion: UnwindSafe, <I as Interner>::PlaceholderTy: UnwindSafe, <I as Interner>::Ty: UnwindSafe,
Blanket Implementations§
source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere T: Copy,
fn allocate_on<'a>(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter<'a>( arena: &'a Arena<'tcx>, iter: impl IntoIterator<Item = T> ) -> &'a mut [T]
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
source§impl<Tcx, T> DepNodeParams<Tcx> for Twhere
Tcx: DepContext,
T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
impl<Tcx, T> DepNodeParams<Tcx> for Twhere Tcx: DepContext, T: for<'a> HashStable<StableHashingContext<'a>> + Debug,
default fn fingerprint_style() -> FingerprintStyle
source§default fn to_fingerprint(&self, tcx: Tcx) -> Fingerprint
default fn to_fingerprint(&self, tcx: Tcx) -> Fingerprint
This method turns the parameters of a DepNodeConstructor into an opaque
Fingerprint to be used in DepNode.
Not all DepNodeParams support being turned into a Fingerprint (they
don’t need to if the corresponding DepNode is anonymous).
default fn to_debug_str(&self, _: Tcx) -> String
source§default fn recover(_: Tcx, _: &DepNode) -> Option<T>
default fn recover(_: Tcx, _: &DepNode) -> Option<T>
This method tries to recover the query key from the given
DepNode
,
something which is needed when forcing DepNode
s during red-green
evaluation. The query system will only call this method if
fingerprint_style()
is not FingerprintStyle::Opaque
.
It is always valid to return None
here, in which case incremental
compilation will treat the query as having changed instead of forcing it.source§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
source§impl<'tcx, T> ToPredicate<'tcx, T> for T
impl<'tcx, T> ToPredicate<'tcx, T> for T
fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> T
source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle: &[QueryInfo], _guar: ErrorGuaranteed ) -> T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.