diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-02-17 21:20:48 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2020-02-19 23:19:15 +0100 |
| commit | 71c4f76153590fc1744c7f73b94d2d39ae2e2f23 (patch) | |
| tree | 6f82dcffb1febb85fb07cfee934c371b319d5716 | |
| parent | d4c6dfe6d6028dacc0dc59f509a823aad2d2cdf6 (diff) | |
| download | rust-71c4f76153590fc1744c7f73b94d2d39ae2e2f23.tar.gz rust-71c4f76153590fc1744c7f73b94d2d39ae2e2f23.zip | |
Reorder yield visitation order to match call
| -rw-r--r-- | src/librustc/mir/visit.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/dataflow/move_paths/builder.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/mir/visit.rs b/src/librustc/mir/visit.rs index 8330bbe0834..409c981801b 100644 --- a/src/librustc/mir/visit.rs +++ b/src/librustc/mir/visit.rs @@ -519,12 +519,12 @@ macro_rules! make_mir_visitor { resume_arg, drop: _, } => { + self.visit_operand(value, source_location); self.visit_place( resume_arg, PlaceContext::MutatingUse(MutatingUseContext::Store), source_location, ); - self.visit_operand(value, source_location); } } 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: _ } => { |
