pub enum UnevaluatedConstKind<I>where
I: Interner,{
Projection {
def_id: <I as Interner>::TraitAssocConstId,
},
Inherent {
def_id: <I as Interner>::InherentAssocConstId,
},
Free {
def_id: <I as Interner>::FreeConstAliasId,
},
Anon {
def_id: <I as Interner>::UnevaluatedConstId,
},
}Expand description
UnevaluatedConstKind is extremely similar to AliasTyKind, and likely should be reasoned about and handled in very similar ways. The documentation for AliasTyKind/etc. may be helpful when learning about UnevaluatedConstKind.
Variants§
Projection
A projection <Type as Trait>::AssocConst
Fields
§
def_id: <I as Interner>::TraitAssocConstIdInherent
An associated constant in an inherent impl
Fields
§
def_id: <I as Interner>::InherentAssocConstIdFree
A free constant, outside an impl block.
Fields
§
def_id: <I as Interner>::FreeConstAliasIdAnon
Anonymous constant, e.g. the 1 + 2 in [u8; 1 + 2].
Fields
§
def_id: <I as Interner>::UnevaluatedConstIdImplementations§
Source§impl<I> UnevaluatedConstKind<I>where
I: Interner,
impl<I> UnevaluatedConstKind<I>where
I: Interner,
pub fn new_from_def_id( interner: I, def_id: <I as Interner>::DefId, ) -> UnevaluatedConstKind<I>
pub fn def_id(self) -> <I as Interner>::DefId
Trait Implementations§
Source§impl<I> Clone for UnevaluatedConstKind<I>where
I: Interner,
impl<I> Clone for UnevaluatedConstKind<I>where
I: Interner,
Source§fn clone(&self) -> UnevaluatedConstKind<I>
fn clone(&self) -> UnevaluatedConstKind<I>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<I> Copy for UnevaluatedConstKind<I>where
I: Interner,
Source§impl<I> Debug for UnevaluatedConstKind<I>where
I: Interner,
impl<I> Debug for UnevaluatedConstKind<I>where
I: Interner,
Source§impl<I, __D> Decodable<__D> for UnevaluatedConstKind<I>where
I: Interner,
__D: Decoder,
<I as Interner>::TraitAssocConstId: Decodable<__D>,
<I as Interner>::InherentAssocConstId: Decodable<__D>,
<I as Interner>::FreeConstAliasId: Decodable<__D>,
<I as Interner>::UnevaluatedConstId: Decodable<__D>,
impl<I, __D> Decodable<__D> for UnevaluatedConstKind<I>where
I: Interner,
__D: Decoder,
<I as Interner>::TraitAssocConstId: Decodable<__D>,
<I as Interner>::InherentAssocConstId: Decodable<__D>,
<I as Interner>::FreeConstAliasId: Decodable<__D>,
<I as Interner>::UnevaluatedConstId: Decodable<__D>,
fn decode(__decoder: &mut __D) -> UnevaluatedConstKind<I>
Source§impl<I, __E> Encodable<__E> for UnevaluatedConstKind<I>where
I: Interner,
__E: Encoder,
<I as Interner>::TraitAssocConstId: Encodable<__E>,
<I as Interner>::InherentAssocConstId: Encodable<__E>,
<I as Interner>::FreeConstAliasId: Encodable<__E>,
<I as Interner>::UnevaluatedConstId: Encodable<__E>,
impl<I, __E> Encodable<__E> for UnevaluatedConstKind<I>where
I: Interner,
__E: Encoder,
<I as Interner>::TraitAssocConstId: Encodable<__E>,
<I as Interner>::InherentAssocConstId: Encodable<__E>,
<I as Interner>::FreeConstAliasId: Encodable<__E>,
<I as Interner>::UnevaluatedConstId: Encodable<__E>,
Source§impl<I> From<UnevaluatedConstKind<I>> for AliasTermKind<I>where
I: Interner,
impl<I> From<UnevaluatedConstKind<I>> for AliasTermKind<I>where
I: Interner,
Source§fn from(value: UnevaluatedConstKind<I>) -> AliasTermKind<I>
fn from(value: UnevaluatedConstKind<I>) -> AliasTermKind<I>
Converts to this type from the input type.
Source§impl<I> Hash for UnevaluatedConstKind<I>where
I: Interner,
impl<I> Hash for UnevaluatedConstKind<I>where
I: Interner,
Source§impl<I, J> Lift<J> for UnevaluatedConstKind<I>where
J: Interner,
<I as Interner>::TraitAssocConstId: Lift<J, Lifted = <J as Interner>::TraitAssocConstId>,
<I as Interner>::InherentAssocConstId: Lift<J, Lifted = <J as Interner>::InherentAssocConstId>,
<I as Interner>::FreeConstAliasId: Lift<J, Lifted = <J as Interner>::FreeConstAliasId>,
I: Interner,
<I as Interner>::UnevaluatedConstId: Lift<J, Lifted = <J as Interner>::UnevaluatedConstId>,
impl<I, J> Lift<J> for UnevaluatedConstKind<I>where
J: Interner,
<I as Interner>::TraitAssocConstId: Lift<J, Lifted = <J as Interner>::TraitAssocConstId>,
<I as Interner>::InherentAssocConstId: Lift<J, Lifted = <J as Interner>::InherentAssocConstId>,
<I as Interner>::FreeConstAliasId: Lift<J, Lifted = <J as Interner>::FreeConstAliasId>,
I: Interner,
<I as Interner>::UnevaluatedConstId: Lift<J, Lifted = <J as Interner>::UnevaluatedConstId>,
type Lifted = UnevaluatedConstKind<J>
fn lift_to_interner(self, interner: J) -> UnevaluatedConstKind<J>
Source§impl<I> PartialEq for UnevaluatedConstKind<I>where
I: Interner,
impl<I> PartialEq for UnevaluatedConstKind<I>where
I: Interner,
Source§fn eq(&self, __other: &UnevaluatedConstKind<I>) -> bool
fn eq(&self, __other: &UnevaluatedConstKind<I>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<I> StableHash for UnevaluatedConstKind<I>where
I: Interner,
<I as Interner>::TraitAssocConstId: StableHash,
<I as Interner>::InherentAssocConstId: StableHash,
<I as Interner>::FreeConstAliasId: StableHash,
<I as Interner>::UnevaluatedConstId: StableHash,
impl<I> StableHash for UnevaluatedConstKind<I>where
I: Interner,
<I as Interner>::TraitAssocConstId: StableHash,
<I as Interner>::InherentAssocConstId: StableHash,
<I as Interner>::FreeConstAliasId: StableHash,
<I as Interner>::UnevaluatedConstId: StableHash,
fn stable_hash<__Hcx>(
&self,
__hcx: &mut __Hcx,
__hasher: &mut StableHasher<SipHasher128>,
)where
__Hcx: StableHashCtxt,
Auto Trait Implementations§
impl<I> DynSend for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: DynSend,
<I as Interner>::InherentAssocConstId: DynSend,
<I as Interner>::FreeConstAliasId: DynSend,
<I as Interner>::UnevaluatedConstId: DynSend,
impl<I> DynSync for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: DynSync,
<I as Interner>::InherentAssocConstId: DynSync,
<I as Interner>::FreeConstAliasId: DynSync,
<I as Interner>::UnevaluatedConstId: DynSync,
impl<I> Freeze for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: Freeze,
<I as Interner>::InherentAssocConstId: Freeze,
<I as Interner>::FreeConstAliasId: Freeze,
<I as Interner>::UnevaluatedConstId: Freeze,
impl<I> RefUnwindSafe for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: RefUnwindSafe,
<I as Interner>::InherentAssocConstId: RefUnwindSafe,
<I as Interner>::FreeConstAliasId: RefUnwindSafe,
<I as Interner>::UnevaluatedConstId: RefUnwindSafe,
impl<I> Send for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: Send,
<I as Interner>::InherentAssocConstId: Send,
<I as Interner>::FreeConstAliasId: Send,
<I as Interner>::UnevaluatedConstId: Send,
impl<I> Sync for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: Sync,
<I as Interner>::InherentAssocConstId: Sync,
<I as Interner>::FreeConstAliasId: Sync,
<I as Interner>::UnevaluatedConstId: Sync,
impl<I> Unpin for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: Unpin,
<I as Interner>::InherentAssocConstId: Unpin,
<I as Interner>::FreeConstAliasId: Unpin,
<I as Interner>::UnevaluatedConstId: Unpin,
impl<I> UnsafeUnpin for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: UnsafeUnpin,
<I as Interner>::InherentAssocConstId: UnsafeUnpin,
<I as Interner>::FreeConstAliasId: UnsafeUnpin,
<I as Interner>::UnevaluatedConstId: UnsafeUnpin,
impl<I> UnwindSafe for UnevaluatedConstKind<I>where
<I as Interner>::TraitAssocConstId: UnwindSafe,
<I as Interner>::InherentAssocConstId: UnwindSafe,
<I as Interner>::FreeConstAliasId: UnwindSafe,
<I as Interner>::UnevaluatedConstId: 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(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T
fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx mut [T]
Source§impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut T
fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = T>, ) -> &'tcx 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<'tcx, T> DepNodeKey<'tcx> for Twhere
T: StableHash + Debug,
impl<'tcx, T> DepNodeKey<'tcx> for Twhere
T: StableHash + Debug,
default fn key_fingerprint_style() -> KeyFingerprintStyle
Source§default fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint
default fn to_fingerprint(&self, tcx: TyCtxt<'tcx>) -> Fingerprint
This method turns a query key into an opaque
Fingerprint to be used
in DepNode.Source§default fn try_recover_key(_: TyCtxt<'tcx>, _: &DepNode) -> Option<T>
default fn try_recover_key(_: TyCtxt<'tcx>, _: &DepNode) -> Option<T>
This method tries to recover the query key from the given
DepNode,
something which is needed when forcing DepNodes 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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<K> IntoQueryKey<K> for K
impl<K> IntoQueryKey<K> for K
Source§fn into_query_key(self) -> K
fn into_query_key(self) -> K
Argument conversion from
Self to K.
This should always be a very cheap conversion, e.g. LocalDefId::to_def_id.Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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.