Skip to content

Commit fe1753a

Browse files
Always validate MIR after optimizing
1 parent e04318e commit fe1753a

File tree

1 file changed

+5
-0
lines changed
  • src/librustc_mir/transform

1 file changed

+5
-0
lines changed

src/librustc_mir/transform/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ pub fn run_passes(
191191
}
192192

193193
body.phase = mir_phase;
194+
195+
if mir_phase == MirPhase::Optimized {
196+
validate::Validator { when: format!("end of phase {:?}", mir_phase) }
197+
.run_pass(tcx, source, body);
198+
}
194199
}
195200

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

0 commit comments

Comments
 (0)