]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/dataflow/move_paths/builder.rs
Reorder yield visitation order to match call
[rust.git] / src / librustc_mir / dataflow / move_paths / builder.rs
index 6f8caca5e21ef1125ee66f2dfd25b798ac2f7542..57aa5de7f7a318de09ab76bf2534e5f572ea601f 100644 (file)
@@ -381,9 +381,9 @@ fn gather_terminator(&mut self, term: &Terminator<'tcx>) {
             }
 
             TerminatorKind::Yield { ref value, resume_arg: ref place, .. } => {
+                self.gather_operand(value);
                 self.create_move_path(place);
                 self.gather_init(place.as_ref(), InitKind::Deep);
-                self.gather_operand(value);
             }
 
             TerminatorKind::Drop { ref location, target: _, unwind: _ } => {