]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/add_moves_for_packed_drops.rs
MIR: split Operand::Consume into Copy and Move.
[rust.git] / src / librustc_mir / transform / add_moves_for_packed_drops.rs
index 297bc76d472f50a87060f0c104173339986fb2f6..2cb8cb60e07d716ed5bbc17026f1da3bd7396535 100644 (file)
@@ -132,7 +132,7 @@ fn add_move_for_packed_drop<'a, 'tcx>(
     patch.add_statement(
         loc, StatementKind::StorageLive(temp));
     patch.add_assign(loc, Lvalue::Local(temp),
-                     Rvalue::Use(Operand::Consume(location.clone())));
+                     Rvalue::Use(Operand::Move(location.clone())));
     patch.patch_terminator(loc.block, TerminatorKind::Drop {
         location: Lvalue::Local(temp),
         target: storage_dead_block,