From 470ada2de0ec507191ad8da35b0712986646d01c Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Sat, 3 Aug 2024 14:11:31 -0400 Subject: Make validate_mir pull optimized/ctfe MIR for all bodies --- compiler/rustc_interface/src/passes.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/rustc_interface/src') diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 8c99b1f4447..023352156eb 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -818,6 +818,13 @@ fn run_required_analyses(tcx: TyCtxt<'_>) { }); sess.time("layout_testing", || layout_test::test_layout(tcx)); sess.time("abi_testing", || abi_test::test_abi(tcx)); + if tcx.sess.opts.unstable_opts.validate_mir { + sess.time("ensuring_optimized_MIR_is_computable", || { + tcx.hir().par_body_owners(|def_id| { + tcx.instance_mir(ty::InstanceKind::Item(def_id.into())); + }); + }); + } } /// Runs the type-checking, region checking and other miscellaneous analysis -- cgit 1.4.1-3-g733a5