]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/instcombine.rs
MIR: split Operand::Consume into Copy and Move.
[rust.git] / src / librustc_mir / transform / instcombine.rs
index d66d4b14d693d993ed21b7859c4cc89a64a886ad..b45db18eff5f08f3d09ac67ba5195512a0c47c94 100644 (file)
@@ -59,7 +59,7 @@ fn visit_rvalue(&mut self, rvalue: &mut Rvalue<'tcx>, location: Location) {
                 }
                 _ => bug!("Detected `&*` but didn't find `&*`!"),
             };
-            *rvalue = Rvalue::Use(Operand::Consume(new_lvalue))
+            *rvalue = Rvalue::Use(Operand::Copy(new_lvalue))
         }
 
         if let Some(constant) = self.optimizations.arrays_lengths.remove(&location) {