Always validate MIR after optimizing

This commit is contained in:
Jonas Schievink 2020-05-25 22:04:48 +02:00
parent e04318e0fa
commit fe1753af84

View File

@ -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 {