Run MIR passes on promoted temporaries again.
This commit is contained in:
parent
85eadf84f3
commit
14d62c650f
1 changed files with 8 additions and 0 deletions
|
@ -148,6 +148,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…
Add table
Add a link
Reference in a new issue