Skip to content

Commit 2d5b8b0

Browse files
committed
Disable MIR on beta/stable until we've resolved #29227 is resolved.
1 parent c5d650c commit 2d5b8b0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/librustc_driver/driver.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use syntax::ast::{self, NodeIdAssigner};
4646
use syntax::attr;
4747
use syntax::attr::AttrMetaMethods;
4848
use syntax::diagnostics;
49+
use syntax::feature_gate::UnstableFeatures;
4950
use syntax::fold::Folder;
5051
use syntax::parse;
5152
use syntax::parse::token;
@@ -750,9 +751,18 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
750751
time(time_passes, "match checking", ||
751752
middle::check_match::check_crate(tcx));
752753

753-
let _mir_map =
754-
time(time_passes, "MIR dump", ||
755-
mir::mir_map::build_mir_for_crate(tcx));
754+
match tcx.sess.opts.unstable_features {
755+
UnstableFeatures::Disallow => {
756+
// use this as a shorthand for beta/stable, and skip
757+
// MIR construction there until known regressions are
758+
// addressed
759+
}
760+
UnstableFeatures::Allow | UnstableFeatures::Cheat => {
761+
let _mir_map =
762+
time(time_passes, "MIR dump", ||
763+
mir::mir_map::build_mir_for_crate(tcx));
764+
}
765+
}
756766

757767
time(time_passes, "liveness checking", ||
758768
middle::liveness::check_crate(tcx));

0 commit comments

Comments
 (0)