about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-10-26 15:05:35 -0400
committerNiko Matsakis <niko@alum.mit.edu>2015-10-26 15:05:35 -0400
commit2d5b8b0f2de07d33cbf53f6feefffb3a0d7242ca (patch)
tree8fd5c7eb91b6411c8fab79d14fc70493f93966ef
parentc5d650cf74e76561b97dcbf7e4836f19bf1c1e6e (diff)
downloadrust-2d5b8b0f2de07d33cbf53f6feefffb3a0d7242ca.tar.gz
rust-2d5b8b0f2de07d33cbf53f6feefffb3a0d7242ca.zip
Disable MIR on beta/stable until we've resolved #29227 is resolved.
-rw-r--r--src/librustc_driver/driver.rs16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index c086737b640..69c4dcb0a19 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -46,6 +46,7 @@ use syntax::ast::{self, NodeIdAssigner};
 use syntax::attr;
 use syntax::attr::AttrMetaMethods;
 use syntax::diagnostics;
+use syntax::feature_gate::UnstableFeatures;
 use syntax::fold::Folder;
 use syntax::parse;
 use syntax::parse::token;
@@ -750,9 +751,18 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
         time(time_passes, "match checking", ||
             middle::check_match::check_crate(tcx));
 
-        let _mir_map =
-            time(time_passes, "MIR dump", ||
-                 mir::mir_map::build_mir_for_crate(tcx));
+        match tcx.sess.opts.unstable_features {
+            UnstableFeatures::Disallow => {
+                // use this as a shorthand for beta/stable, and skip
+                // MIR construction there until known regressions are
+                // addressed
+            }
+            UnstableFeatures::Allow | UnstableFeatures::Cheat => {
+                let _mir_map =
+                    time(time_passes, "MIR dump", ||
+                            mir::mir_map::build_mir_for_crate(tcx));
+            }
+        }
 
         time(time_passes, "liveness checking", ||
             middle::liveness::check_crate(tcx));