pub enum ConstOperandKind<'tcx> {
Value(ConstantExpr<'tcx>),
Promoted(ItemRef<'tcx>),
}Variants§
Value(ConstantExpr<'tcx>)
An evaluated constant represented as an expression.
Promoted(ItemRef<'tcx>)
Part of a MIR body that was promoted to be a constant. May not be evaluatable because of
generics.
It’s a reference to the DefId of the constant. Note that rustc does not give a DefId to
promoted constants, but we do in hax.
Trait Implementations§
Source§impl<'tcx> Clone for ConstOperandKind<'tcx>
impl<'tcx> Clone for ConstOperandKind<'tcx>
Source§fn clone(&self) -> ConstOperandKind<'tcx>
fn clone(&self) -> ConstOperandKind<'tcx>
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 moreAuto Trait Implementations§
impl<'tcx> DynSend for ConstOperandKind<'tcx>
impl<'tcx> DynSync for ConstOperandKind<'tcx>
impl<'tcx> Freeze for ConstOperandKind<'tcx>
impl<'tcx> RefUnwindSafe for ConstOperandKind<'tcx>
impl<'tcx> Send for ConstOperandKind<'tcx>
impl<'tcx> Sync for ConstOperandKind<'tcx>
impl<'tcx> Unpin for ConstOperandKind<'tcx>
impl<'tcx> UnsafeUnpin for ConstOperandKind<'tcx>
impl<'tcx> UnwindSafe for ConstOperandKind<'tcx>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more