pub enum UnevaluatedConstKind<I: Interner> {
Projection {
def_id: I::TraitAssocConstId,
},
Inherent {
def_id: I::InherentAssocConstId,
},
Free {
def_id: I::FreeConstAliasId,
},
Anon {
def_id: I::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::TraitAssocConstIdInherent
An associated constant in an inherent impl
Fields
§
def_id: I::InherentAssocConstIdFree
A free constant, outside an impl block.
Fields
§
def_id: I::FreeConstAliasIdAnon
Anonymous constant, e.g. the 1 + 2 in [u8; 1 + 2].
Fields
§
def_id: I::UnevaluatedConstIdImplementations§
Source§impl<I: Interner> UnevaluatedConstKind<I>
impl<I: Interner> UnevaluatedConstKind<I>
Trait Implementations§
Source§impl<I> Clone for UnevaluatedConstKind<I>where
I: Interner,
impl<I> Clone 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: Interner, __D: Decoder> Decodable<__D> for UnevaluatedConstKind<I>where
I::TraitAssocConstId: Decodable<__D>,
I::InherentAssocConstId: Decodable<__D>,
I::FreeConstAliasId: Decodable<__D>,
I::UnevaluatedConstId: Decodable<__D>,
impl<I: Interner, __D: Decoder> Decodable<__D> for UnevaluatedConstKind<I>where
I::TraitAssocConstId: Decodable<__D>,
I::InherentAssocConstId: Decodable<__D>,
I::FreeConstAliasId: Decodable<__D>,
I::UnevaluatedConstId: Decodable<__D>,
Source§impl<I: Interner, __E: Encoder> Encodable<__E> for UnevaluatedConstKind<I>where
I::TraitAssocConstId: Encodable<__E>,
I::InherentAssocConstId: Encodable<__E>,
I::FreeConstAliasId: Encodable<__E>,
I::UnevaluatedConstId: Encodable<__E>,
impl<I: Interner, __E: Encoder> Encodable<__E> for UnevaluatedConstKind<I>where
I::TraitAssocConstId: Encodable<__E>,
I::InherentAssocConstId: Encodable<__E>,
I::FreeConstAliasId: Encodable<__E>,
I::UnevaluatedConstId: Encodable<__E>,
Source§impl<I: Interner> From<UnevaluatedConstKind<I>> for AliasTermKind<I>
impl<I: Interner> From<UnevaluatedConstKind<I>> for AliasTermKind<I>
Source§fn from(value: UnevaluatedConstKind<I>) -> Self
fn from(value: UnevaluatedConstKind<I>) -> Self
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
I: Interner,
J: Interner,
I::TraitAssocConstId: Lift<J, Lifted = J::TraitAssocConstId>,
I::InherentAssocConstId: Lift<J, Lifted = J::InherentAssocConstId>,
I::FreeConstAliasId: Lift<J, Lifted = J::FreeConstAliasId>,
I::UnevaluatedConstId: Lift<J, Lifted = J::UnevaluatedConstId>,
impl<I, J> Lift<J> for UnevaluatedConstKind<I>where
I: Interner,
J: Interner,
I::TraitAssocConstId: Lift<J, Lifted = J::TraitAssocConstId>,
I::InherentAssocConstId: Lift<J, Lifted = J::InherentAssocConstId>,
I::FreeConstAliasId: Lift<J, Lifted = J::FreeConstAliasId>,
I::UnevaluatedConstId: Lift<J, Lifted = J::UnevaluatedConstId>,
type Lifted = UnevaluatedConstKind<J>
fn lift_to_interner(self, interner: J) -> Self::Lifted
Source§impl<I> PartialEq for UnevaluatedConstKind<I>where
I: Interner,
impl<I> PartialEq for UnevaluatedConstKind<I>where
I: Interner,
Source§impl<I: Interner> StableHash for UnevaluatedConstKind<I>where
I::TraitAssocConstId: StableHash,
I::InherentAssocConstId: StableHash,
I::FreeConstAliasId: StableHash,
I::UnevaluatedConstId: StableHash,
impl<I: Interner> StableHash for UnevaluatedConstKind<I>where
I::TraitAssocConstId: StableHash,
I::InherentAssocConstId: StableHash,
I::FreeConstAliasId: StableHash,
I::UnevaluatedConstId: StableHash,
fn stable_hash<__Hcx: StableHashCtxt>( &self, __hcx: &mut __Hcx, __hasher: &mut StableHasher, )
impl<I> Copy for UnevaluatedConstKind<I>where
I: Interner,
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<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<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<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>
impl<T> ErasedDestructor for Twhere
T: 'static,
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.