Skip to content

Commit

Permalink
Run MIR passes on promoted temporaries again.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Aug 16, 2017
1 parent 85eadf8 commit 14d62c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/librustc_mir/transform/mod.rs
Expand Up @@ -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);
}
Expand Down

0 comments on commit 14d62c6

Please sign in to comment.