[][src]Enum rustc::mir::Operand

pub enum Operand<'tcx> {
    Copy(Place<'tcx>),
    Move(Place<'tcx>),
    Constant(Box<Constant<'tcx>>),
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

These are values that can appear inside an rvalue. They are intentionally limited to prevent rvalues from being nested in one another.

Variants

Copy(Place<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Copy: The value must be available for use afterwards.

This implies that the type of the place must be Copy; this is true by construction during build, but also checked by the MIR type checker.

Move(Place<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Move: The value (including old borrows of it) will not be used again.

Safe for values of all types (modulo future developments towards ?Move). Correct usage patterns are enforced by the borrow checker for safe code. Copy may be converted to Move to enable "last-use" optimizations.

Constant(Box<Constant<'tcx>>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Synthesizes a constant value.

Methods

impl<'tcx> Operand<'tcx>[src]

pub fn ty<D>(&self, local_decls: &D, tcx: TyCtxt<'tcx>) -> Ty<'tcx> where
    D: HasLocalDecls<'tcx>, 
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'tcx> Operand<'tcx>[src]

pub fn function_handle(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    substs: SubstsRef<'tcx>,
    span: Span
) -> Self
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Convenience helper to make a constant that refers to the fn with given DefId and substs. Since this is used to synthesize MIR, assumes user_ty is None.

pub fn to_copy(&self) -> Self[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<'tcx> Clone for Operand<'tcx>[src]

impl<'tcx> Debug for Operand<'tcx>[src]

impl<'tcx> Decodable for Operand<'tcx>[src]

impl<'tcx> Encodable for Operand<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for Operand<'tcx>[src]

impl<'tcx> PartialEq<Operand<'tcx>> for Operand<'tcx>[src]

impl<'tcx> StructuralPartialEq for Operand<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for Operand<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for Operand<'tcx>

impl<'tcx> !Send for Operand<'tcx>

impl<'tcx> !Sync for Operand<'tcx>

impl<'tcx> Unpin for Operand<'tcx>

impl<'tcx> !UnwindSafe for Operand<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<E> SpecializationError for E[src]

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]