Enum rustc_middle::mir::visit::NonMutatingUseContext [−][src]
pub enum NonMutatingUseContext {
Inspect,
Copy,
Move,
SharedBorrow,
ShallowBorrow,
UniqueBorrow,
AddressOf,
Projection,
}
Variants
Being inspected in some way, like loading a len.
Consumed as part of an operand.
Consumed as part of an operand.
Shared borrow.
Shallow borrow.
Unique borrow.
AddressOf for *const pointer.
Used as base for another place, e.g., x
in x.y
. Will not mutate the place.
For example, the projection x.y
is not marked as a mutation in these cases:
z = x.y;
f(&x.y);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NonMutatingUseContext
impl Send for NonMutatingUseContext
impl Sync for NonMutatingUseContext
impl Unpin for NonMutatingUseContext
impl UnwindSafe for NonMutatingUseContext
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Inspect
: 0 bytesCopy
: 0 bytesMove
: 0 bytesSharedBorrow
: 0 bytesShallowBorrow
: 0 bytesUniqueBorrow
: 0 bytesAddressOf
: 0 bytesProjection
: 0 bytes