Enum rustc_const_eval::interpret::eval_context::LocalValue
source · [−]pub enum LocalValue<Tag: Provenance = AllocId> {
Dead,
Live(Operand<Tag>),
}Expand description
Current value of a local variable
Variants
Dead
This local is not currently alive, and cannot be used at all.
Live(Operand<Tag>)
A normal, live local.
Mostly for convenience, we re-use the Operand type here.
This is an optimization over just always having a pointer here;
we can thus avoid doing an allocation when the local just stores
immediate values and never has its address taken.
Trait Implementations
sourceimpl<Tag: Clone + Provenance> Clone for LocalValue<Tag>
impl<Tag: Clone + Provenance> Clone for LocalValue<Tag>
sourcefn clone(&self) -> LocalValue<Tag>
fn clone(&self) -> LocalValue<Tag>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<Tag: Debug + Provenance> Debug for LocalValue<Tag>
impl<Tag: Debug + Provenance> Debug for LocalValue<Tag>
sourceimpl<'__ctx, Tag: Provenance> HashStable<StableHashingContext<'__ctx>> for LocalValue<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag: Provenance> HashStable<StableHashingContext<'__ctx>> for LocalValue<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
fn hash_stable(
&self,
__hcx: &mut StableHashingContext<'__ctx>,
__hasher: &mut StableHasher
)
sourceimpl<Tag: PartialEq + Provenance> PartialEq<LocalValue<Tag>> for LocalValue<Tag>
impl<Tag: PartialEq + Provenance> PartialEq<LocalValue<Tag>> for LocalValue<Tag>
sourcefn eq(&self, other: &LocalValue<Tag>) -> bool
fn eq(&self, other: &LocalValue<Tag>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &LocalValue<Tag>) -> bool
fn ne(&self, other: &LocalValue<Tag>) -> bool
This method tests for !=.
impl<Tag: Copy + Provenance> Copy for LocalValue<Tag>
impl<Tag: Eq + Provenance> Eq for LocalValue<Tag>
impl<Tag: Provenance> StructuralEq for LocalValue<Tag>
impl<Tag: Provenance> StructuralPartialEq for LocalValue<Tag>
Auto Trait Implementations
impl<Tag> RefUnwindSafe for LocalValue<Tag> where
Tag: RefUnwindSafe,
impl<Tag> Send for LocalValue<Tag> where
Tag: Send,
impl<Tag> Sync for LocalValue<Tag> where
Tag: Sync,
impl<Tag> Unpin for LocalValue<Tag> where
Tag: Unpin,
impl<Tag> UnwindSafe for LocalValue<Tag> where
Tag: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.