Enum rustc_mir::interpret::LocalValue[][src]

pub enum LocalValue<Tag: Provenance = AllocId> {
    Dead,
    Uninitialized,
    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.

Uninitialized

This local is alive but not yet initialized. It can be written to but not read from or its address taken. Locals get initialized on first write because for unsized locals, we do not know their size before that.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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.