diff options
Diffstat (limited to 'src/librustc_mir/build/expr/as_operand.rs')
| -rw-r--r-- | src/librustc_mir/build/expr/as_operand.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_mir/build/expr/as_operand.rs b/src/librustc_mir/build/expr/as_operand.rs index ea6e4342098..7eae414a391 100644 --- a/src/librustc_mir/build/expr/as_operand.rs +++ b/src/librustc_mir/build/expr/as_operand.rs @@ -32,7 +32,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> { } /// Compile `expr` into a value that can be used as an operand. - /// If `expr` is an lvalue like `x`, this will introduce a + /// If `expr` is a place like `x`, this will introduce a /// temporary `tmp = x`, so that we capture the value of `x` at /// this time. /// @@ -70,11 +70,11 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> { let constant = this.as_constant(expr); block.and(Operand::Constant(box constant)) } - Category::Lvalue | + Category::Place | Category::Rvalue(..) => { let operand = unpack!(block = this.as_temp(block, scope, expr)); - block.and(Operand::Consume(Lvalue::Local(operand))) + block.and(Operand::Move(Place::Local(operand))) } } } |
