about summary refs log tree commit diff
path: root/src/librustc_mir
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-02-17 21:20:48 +0100
committerJonas Schievink <jonasschievink@gmail.com>2020-02-19 23:19:15 +0100
commit71c4f76153590fc1744c7f73b94d2d39ae2e2f23 (patch)
tree6f82dcffb1febb85fb07cfee934c371b319d5716 /src/librustc_mir
parentd4c6dfe6d6028dacc0dc59f509a823aad2d2cdf6 (diff)
downloadrust-71c4f76153590fc1744c7f73b94d2d39ae2e2f23.tar.gz
rust-71c4f76153590fc1744c7f73b94d2d39ae2e2f23.zip
Reorder yield visitation order to match call
Diffstat (limited to 'src/librustc_mir')
-rw-r--r--src/librustc_mir/dataflow/move_paths/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs
index 6f8caca5e21..57aa5de7f7a 100644
--- a/src/librustc_mir/dataflow/move_paths/builder.rs
+++ b/src/librustc_mir/dataflow/move_paths/builder.rs
@@ -381,9 +381,9 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, '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: _ } => {