]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/transform/elaborate_drops.rs
MIR: split Operand::Consume into Copy and Move.
[rust.git] / src / librustc_mir / transform / elaborate_drops.rs
index c24256cc92cde133ec0005b12040b0799f68a456..6f94bd1f88f14fb2dbad9c72b2b4ad8b1bcd1949 100644 (file)
@@ -50,7 +50,7 @@ fn run_pass<'a, 'tcx>(&self,
             _ => return
         }
         let param_env = tcx.param_env(src.def_id);
-        let move_data = MoveData::gather_moves(mir, tcx, param_env).unwrap();
+        let move_data = MoveData::gather_moves(mir, tcx).unwrap();
         let elaborate_patch = {
             let mir = &*mir;
             let env = MoveDataParamEnv {
@@ -278,7 +278,7 @@ fn downcast_subpath(&self, path: Self::Path, variant: usize) -> Option<Self::Pat
     }
 
     fn get_drop_flag(&mut self, path: Self::Path) -> Option<Operand<'tcx>> {
-        self.ctxt.drop_flag(path).map(Operand::Consume)
+        self.ctxt.drop_flag(path).map(Operand::Copy)
     }
 }