Enum rustc::mir::repr::Rvalue
[−]
[src]
pub enum Rvalue<'tcx> {
Use(Operand<'tcx>),
Repeat(Operand<'tcx>, TypedConstVal<'tcx>),
Ref(Region, BorrowKind, Lvalue<'tcx>),
Len(Lvalue<'tcx>),
Cast(CastKind, Operand<'tcx>, Ty<'tcx>),
BinaryOp(BinOp, Operand<'tcx>, Operand<'tcx>),
UnaryOp(UnOp, Operand<'tcx>),
Box(Ty<'tcx>),
Aggregate(AggregateKind<'tcx>, Vec<Operand<'tcx>>),
Slice {
input: Lvalue<'tcx>,
from_start: usize,
from_end: usize,
},
InlineAsm {
asm: InlineAsm,
outputs: Vec<Lvalue<'tcx>>,
inputs: Vec<Operand<'tcx>>,
},
}Unstable (
rustc_private)Rvalues
Variants
Use(Operand<'tcx>)Unstable (
rustc_private)x (either a move or copy, depending on type of x)
Repeat(Operand<'tcx>, TypedConstVal<'tcx>)Unstable (
rustc_private)[x; 32]
Ref(Region, BorrowKind, Lvalue<'tcx>)Unstable (
rustc_private)&x or &mut x
Len(Lvalue<'tcx>)Unstable (
rustc_private)length of a [X] or [X;n] value
Cast(CastKind, Operand<'tcx>, Ty<'tcx>)Unstable (
rustc_private)BinaryOp(BinOp, Operand<'tcx>, Operand<'tcx>)Unstable (
rustc_private)UnaryOp(UnOp, Operand<'tcx>)Unstable (
rustc_private)Box(Ty<'tcx>)Unstable (
rustc_private)Creates an uninitialized Box
Aggregate(AggregateKind<'tcx>, Vec<Operand<'tcx>>)Unstable (
rustc_private)Create an aggregate value, like a tuple or struct. This is
only needed because we want to distinguish dest = Foo { x: ..., y: ... } from dest.x = ...; dest.y = ...; in the case
that Foo has a destructor. These rvalues can be optimized
away after type-checking and before lowering.
SliceUnstable (
rustc_private)Generates a slice of the form &input[from_start..L-from_end]
where L is the length of the slice. This is only created by
slice pattern matching, so e.g. a pattern of the form [x, y, .., z] might create a slice with from_start=2 and
from_end=1.
Fields
input: Lvalue<'tcx> | Unstable ( rustc_private) |
from_start: usize | Unstable ( rustc_private) |
from_end: usize | Unstable ( rustc_private) |
InlineAsmUnstable (
rustc_private)Fields
asm: InlineAsm | Unstable ( rustc_private) |
outputs: Vec<Lvalue<'tcx>> | Unstable ( rustc_private) |
inputs: Vec<Operand<'tcx>> | Unstable ( rustc_private) |
Trait Implementations
impl<'tcx> Debug for Rvalue<'tcx>[src]
Derived Implementations
impl<'tcx> Decodable for Rvalue<'tcx>[src]
impl<'tcx> Encodable for Rvalue<'tcx>[src]
impl<'tcx> Clone for Rvalue<'tcx>[src]
fn clone(&self) -> Rvalue<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more