Auto merge of #43902 - michaelwoerister:fix-mir-passes-promoted, r=arielb1
Run MIR passes on promoted temporaries again.
This seems to have been broken some time in the past (maybe here: 9c154a67bf (diff-2f8e8805126c84b2be3f0967ffa0af28L162)
).
r? @arielb1
This commit is contained in:
commit
dd39ecf368
@ -149,6 +149,14 @@ fn run_suite<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
|
||||
pass.run_pass(tcx, source, mir);
|
||||
|
||||
for (index, promoted_mir) in mir.promoted.iter_enumerated_mut() {
|
||||
let promoted_source = MirSource::Promoted(source.item_id(), index);
|
||||
pass.run_pass(tcx, promoted_source, promoted_mir);
|
||||
|
||||
// Let's make sure we don't miss any nested instances
|
||||
assert!(promoted_mir.promoted.is_empty());
|
||||
}
|
||||
|
||||
for hook in tcx.mir_passes.hooks() {
|
||||
hook.on_mir_pass(tcx, suite, pass_num, &pass.name(), source, &mir, true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user