Skip to content

Commit 71c4f76

Browse files
Reorder yield visitation order to match call
1 parent d4c6dfe commit 71c4f76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustc/mir/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,12 @@ macro_rules! make_mir_visitor {
519519
resume_arg,
520520
drop: _,
521521
} => {
522+
self.visit_operand(value, source_location);
522523
self.visit_place(
523524
resume_arg,
524525
PlaceContext::MutatingUse(MutatingUseContext::Store),
525526
source_location,
526527
);
527-
self.visit_operand(value, source_location);
528528
}
529529

530530
}

src/librustc_mir/dataflow/move_paths/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
381381
}
382382

383383
TerminatorKind::Yield { ref value, resume_arg: ref place, .. } => {
384+
self.gather_operand(value);
384385
self.create_move_path(place);
385386
self.gather_init(place.as_ref(), InitKind::Deep);
386-
self.gather_operand(value);
387387
}
388388

389389
TerminatorKind::Drop { ref location, target: _, unwind: _ } => {

0 commit comments

Comments
 (0)