Skip to content

Commit

Permalink
Always validate MIR after optimizing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed May 25, 2020
1 parent e04318e commit fe1753a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc_mir/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ pub fn run_passes(
}

body.phase = mir_phase;

if mir_phase == MirPhase::Optimized {
validate::Validator { when: format!("end of phase {:?}", mir_phase) }
.run_pass(tcx, source, body);
}
}

fn mir_const_qualif(tcx: TyCtxt<'_>, def_id: DefId) -> ConstQualifs {
Expand Down

0 comments on commit fe1753a

Please sign in to comment.