about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-08-24 06:36:37 +0300
committerEduard Burtescu <edy.burt@gmail.com>2016-08-24 13:23:37 +0300
commitcb9b0ed91b898cbda23caa8ed1a82c37b39845de (patch)
tree6c63d0df923fda6adf374e0d2be44f64c80c2087 /src
parenta66fa96d1871ee71cc382a276a3e52f6f6e56e01 (diff)
downloadrust-cb9b0ed91b898cbda23caa8ed1a82c37b39845de.tar.gz
rust-cb9b0ed91b898cbda23caa8ed1a82c37b39845de.zip
Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/session/config.rs35
-rw-r--r--src/librustc_trans/base.rs25
-rw-r--r--src/librustc_trans/closure.rs19
-rw-r--r--src/librustc_trans/consts.rs7
-rw-r--r--src/librustc_trans/mir/mod.rs2
-rw-r--r--src/libsyntax/feature_gate.rs5
-rw-r--r--src/test/codegen/adjustments.rs8
-rw-r--r--src/test/codegen/coercions.rs3
-rw-r--r--src/test/codegen/consts.rs20
-rw-r--r--src/test/codegen/drop.rs10
-rw-r--r--src/test/codegen/loads.rs4
-rw-r--r--src/test/codegen/mir_zst_stores.rs2
-rw-r--r--src/test/codegen/naked-functions.rs6
-rw-r--r--src/test/codegen/refs.rs11
-rw-r--r--src/test/codegen/stores.rs11
-rw-r--r--src/test/compile-fail/enable-orbit-for-incr-comp.rs20
-rw-r--r--src/test/run-fail/issue-30380.rs3
-rw-r--r--src/test/run-fail/mir_drop_panics.rs2
-rw-r--r--src/test/run-fail/mir_dynamic_drops_1.rs2
-rw-r--r--src/test/run-fail/mir_dynamic_drops_2.rs3
-rw-r--r--src/test/run-fail/mir_dynamic_drops_3.rs3
-rw-r--r--src/test/run-fail/mir_indexing_oob_1.rs2
-rw-r--r--src/test/run-fail/mir_indexing_oob_2.rs2
-rw-r--r--src/test/run-fail/mir_indexing_oob_3.rs2
-rw-r--r--src/test/run-fail/mir_trans_calls_converging_drops.rs3
-rw-r--r--src/test/run-fail/mir_trans_calls_converging_drops_2.rs3
-rw-r--r--src/test/run-fail/mir_trans_calls_diverging.rs3
-rw-r--r--src/test/run-fail/mir_trans_calls_diverging_drops.rs3
-rw-r--r--src/test/run-fail/mir_trans_no_landing_pads.rs3
-rw-r--r--src/test/run-fail/mir_trans_no_landing_pads_diverging.rs3
-rw-r--r--src/test/run-pass-fulldeps/mir-pass.rs3
-rw-r--r--src/test/run-pass-valgrind/cast-enum-with-dtor.rs5
-rw-r--r--src/test/run-pass/dynamic-drop.rs4
-rw-r--r--src/test/run-pass/exhaustive-bool-match-sanity.rs3
-rw-r--r--src/test/run-pass/issue-16648.rs3
-rw-r--r--src/test/run-pass/issue-28950.rs10
-rw-r--r--src/test/run-pass/issue-32805.rs7
-rw-r--r--src/test/run-pass/issue-33387.rs3
-rw-r--r--src/test/run-pass/issue-7784.rs2
-rw-r--r--src/test/run-pass/match-vec-alternatives.rs6
-rw-r--r--src/test/run-pass/mir_adt_construction.rs7
-rw-r--r--src/test/run-pass/mir_ascription_coercion.rs3
-rw-r--r--src/test/run-pass/mir_augmented_assignments.rs16
-rw-r--r--src/test/run-pass/mir_autoderef.rs4
-rw-r--r--src/test/run-pass/mir_boxing.rs3
-rw-r--r--src/test/run-pass/mir_build_match_comparisons.rs6
-rw-r--r--src/test/run-pass/mir_call_with_associated_type.rs4
-rw-r--r--src/test/run-pass/mir_cast_fn_ret.rs4
-rw-r--r--src/test/run-pass/mir_coercion_casts.rs3
-rw-r--r--src/test/run-pass/mir_coercions.rs9
-rw-r--r--src/test/run-pass/mir_constval_adts.rs3
-rw-r--r--src/test/run-pass/mir_cross_crate.rs3
-rw-r--r--src/test/run-pass/mir_fat_ptr.rs9
-rw-r--r--src/test/run-pass/mir_fat_ptr_drop.rs1
-rw-r--r--src/test/run-pass/mir_match_arm_guard.rs3
-rw-r--r--src/test/run-pass/mir_misc_casts.rs18
-rw-r--r--src/test/run-pass/mir_overflow_off.rs2
-rw-r--r--src/test/run-pass/mir_raw_fat_ptr.rs6
-rw-r--r--src/test/run-pass/mir_refs_correct.rs28
-rw-r--r--src/test/run-pass/mir_small_agg_arg.rs3
-rw-r--r--src/test/run-pass/mir_struct_with_assoc_ty.rs3
-rw-r--r--src/test/run-pass/mir_temp_promotions.rs3
-rw-r--r--src/test/run-pass/mir_trans_array.rs2
-rw-r--r--src/test/run-pass/mir_trans_array_2.rs2
-rw-r--r--src/test/run-pass/mir_trans_call_converging.rs2
-rw-r--r--src/test/run-pass/mir_trans_calls.rs24
-rw-r--r--src/test/run-pass/mir_trans_calls_variadic.rs3
-rw-r--r--src/test/run-pass/mir_trans_critical_edge.rs1
-rw-r--r--src/test/run-pass/mir_trans_spike1.rs3
-rw-r--r--src/test/run-pass/mir_trans_switch.rs4
-rw-r--r--src/test/run-pass/mir_trans_switchint.rs3
-rw-r--r--src/test/run-pass/mir_void_return.rs3
-rw-r--r--src/test/run-pass/mir_void_return_2.rs3
-rw-r--r--src/test/run-pass/vec-matching-fold.rs3
-rw-r--r--src/test/run-pass/vec-matching-legal-tail-element-borrow.rs3
-rw-r--r--src/test/run-pass/vec-matching.rs7
-rw-r--r--src/test/run-pass/vec-tail-matching.rs2
-rw-r--r--src/test/run-pass/zero-size-type-destructors.rs3
-rw-r--r--src/test/run-pass/zero_sized_subslice_match.rs2
79 files changed, 68 insertions, 414 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index e988ddcd97b..852ff091259 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -605,8 +605,6 @@ macro_rules! options {
         pub const parse_bool: Option<&'static str> = None;
         pub const parse_opt_bool: Option<&'static str> =
             Some("one of: `y`, `yes`, `on`, `n`, `no`, or `off`");
-        pub const parse_all_bool: Option<&'static str> =
-            Some("one of: `y`, `yes`, `on`, `n`, `no`, or `off`");
         pub const parse_string: Option<&'static str> = Some("a string");
         pub const parse_opt_string: Option<&'static str> = Some("a string");
         pub const parse_list: Option<&'static str> = Some("a space-separated list of strings");
@@ -656,25 +654,6 @@ macro_rules! options {
             }
         }
 
-        fn parse_all_bool(slot: &mut bool, v: Option<&str>) -> bool {
-            match v {
-                Some(s) => {
-                    match s {
-                        "n" | "no" | "off" => {
-                            *slot = false;
-                        }
-                        "y" | "yes" | "on" => {
-                            *slot = true;
-                        }
-                        _ => { return false; }
-                    }
-
-                    true
-                },
-                None => { *slot = true; true }
-            }
-        }
-
         fn parse_opt_string(slot: &mut Option<String>, v: Option<&str>) -> bool {
             match v {
                 Some(s) => { *slot = Some(s.to_string()); true },
@@ -930,8 +909,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
           "dump MIR state at various points in translation"),
     dump_mir_dir: Option<String> = (None, parse_opt_string, [UNTRACKED],
           "the directory the MIR is dumped into"),
-    orbit: bool = (true, parse_all_bool, [UNTRACKED],
-          "get MIR where it belongs - everywhere; most importantly, in orbit"),
 }
 
 pub fn default_lib_output() -> CrateType {
@@ -1324,15 +1301,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
         })
     });
 
-    let mut debugging_opts = build_debugging_options(matches, error_format);
-
-    // Incremental compilation only works reliably when translation is done via
-    // MIR, so let's enable -Z orbit if necessary (see #34973).
-    if debugging_opts.incremental.is_some() && !debugging_opts.orbit {
-        early_warn(error_format, "Automatically enabling `-Z orbit` because \
-                                  `-Z incremental` was specified");
-        debugging_opts.orbit = true;
-    }
+    let debugging_opts = build_debugging_options(matches, error_format);
 
     let mir_opt_level = debugging_opts.mir_opt_level.unwrap_or(1);
 
@@ -2424,8 +2393,6 @@ mod tests {
         assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
         opts.debugging_opts.dump_mir_dir = Some(String::from("abc"));
         assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
-        opts.debugging_opts.orbit = false;
-        assert_eq!(reference.dep_tracking_hash(), opts.dep_tracking_hash());
 
         // Make sure changing a [TRACKED] option changes the hash
         opts = reference.clone();
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs
index cab353cd262..a1f3e4e5b59 100644
--- a/src/librustc_trans/base.rs
+++ b/src/librustc_trans/base.rs
@@ -1424,26 +1424,17 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> {
             false
         };
 
-        let check_attrs = |attrs: &[ast::Attribute]| {
-            let default_to_mir = ccx.sess().opts.debugging_opts.orbit;
-            let invert = if default_to_mir { "rustc_no_mir" } else { "rustc_mir" };
-            (default_to_mir ^ attrs.iter().any(|item| item.check_name(invert)),
-             attrs.iter().any(|item| item.check_name("no_debug")))
-        };
-
-        let (use_mir, no_debug) = if let Some(id) = local_id {
-            check_attrs(ccx.tcx().map.attrs(id))
+        let no_debug = if let Some(id) = local_id {
+            ccx.tcx().map.attrs(id)
+               .iter().any(|item| item.check_name("no_debug"))
         } else if let Some(def_id) = def_id {
-            check_attrs(&ccx.sess().cstore.item_attrs(def_id))
+            ccx.sess().cstore.item_attrs(def_id)
+               .iter().any(|item| item.check_name("no_debug"))
         } else {
-            check_attrs(&[])
+            false
         };
 
-        let mir = if use_mir {
-            def_id.and_then(|id| ccx.get_mir(id))
-        } else {
-            None
-        };
+        let mir = def_id.and_then(|id| ccx.get_mir(id));
 
         let debug_context = if let (false, Some(definition)) = (no_debug, definition) {
             let (instance, sig, abi, _) = definition;
@@ -1846,6 +1837,8 @@ pub fn trans_closure<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
 
     if fcx.mir.is_some() {
         return mir::trans_mir(&fcx);
+    } else {
+        span_bug!(body.span, "attempted translation of `{}` w/o MIR", instance);
     }
 
     debuginfo::fill_scope_map_for_function(&fcx, decl, body, inlined_id);
diff --git a/src/librustc_trans/closure.rs b/src/librustc_trans/closure.rs
index 77b2c43167c..e0fa8df1100 100644
--- a/src/librustc_trans/closure.rs
+++ b/src/librustc_trans/closure.rs
@@ -181,16 +181,6 @@ fn get_or_create_closure_declaration<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
     llfn
 }
 
-fn translating_closure_body_via_mir_will_fail(ccx: &CrateContext,
-                                              closure_def_id: DefId)
-                                              -> bool {
-    let default_to_mir = ccx.sess().opts.debugging_opts.orbit;
-    let invert = if default_to_mir { "rustc_no_mir" } else { "rustc_mir" };
-    let use_mir = default_to_mir ^ ccx.tcx().has_attr(closure_def_id, invert);
-
-    !use_mir
-}
-
 pub fn trans_closure_body_via_mir<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
                                             closure_def_id: DefId,
                                             closure_substs: ty::ClosureSubsts<'tcx>) {
@@ -362,15 +352,6 @@ pub fn trans_closure_method<'a, 'tcx>(ccx: &'a CrateContext<'a, 'tcx>,
                                closure_def_id,
                                substs);
         } else {
-            // If the closure is defined in an upstream crate, we can only
-            // translate it if MIR-trans is active.
-
-            if translating_closure_body_via_mir_will_fail(ccx, closure_def_id) {
-                ccx.sess().fatal("You have run into a known limitation of the \
-                                  MingW toolchain. Either compile with -Zorbit or \
-                                  with -Ccodegen-units=1 to work around it.");
-            }
-
             trans_closure_body_via_mir(ccx, closure_def_id, substs);
         }
     }
diff --git a/src/librustc_trans/consts.rs b/src/librustc_trans/consts.rs
index 0e989889677..7382d5f0130 100644
--- a/src/librustc_trans/consts.rs
+++ b/src/librustc_trans/consts.rs
@@ -1150,12 +1150,7 @@ pub fn trans_static(ccx: &CrateContext,
         let def_id = ccx.tcx().map.local_def_id(id);
         let datum = get_static(ccx, def_id);
 
-        let check_attrs = |attrs: &[ast::Attribute]| {
-            let default_to_mir = ccx.sess().opts.debugging_opts.orbit;
-            let invert = if default_to_mir { "rustc_no_mir" } else { "rustc_mir" };
-            default_to_mir ^ attrs.iter().any(|item| item.check_name(invert))
-        };
-        let use_mir = check_attrs(ccx.tcx().map.attrs(id));
+        let use_mir = true;
 
         let v = if use_mir {
             ::mir::trans_static_initializer(ccx, def_id)
diff --git a/src/librustc_trans/mir/mod.rs b/src/librustc_trans/mir/mod.rs
index 727b680541d..fe90d7f2725 100644
--- a/src/librustc_trans/mir/mod.rs
+++ b/src/librustc_trans/mir/mod.rs
@@ -145,7 +145,7 @@ impl<'tcx> LocalRef<'tcx> {
 ///////////////////////////////////////////////////////////////////////////
 
 pub fn trans_mir<'blk, 'tcx: 'blk>(fcx: &'blk FunctionContext<'blk, 'tcx>) {
-    let bcx = fcx.init(false, None).build();
+    let bcx = fcx.init(true, None).build();
     let mir = bcx.mir();
 
     // Analyze the temps to determine which must be lvalues
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d94bfe7dcbd..05a485cefab 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -517,11 +517,6 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
                                       is just used for rustc unit tests \
                                       and will never be stable",
                                      cfg_fn!(rustc_attrs))),
-    ("rustc_no_mir", Whitelisted, Gated("rustc_attrs",
-                                        "the `#[rustc_no_mir]` attribute \
-                                         is just used to make tests pass \
-                                         and will never be stable",
-                                        cfg_fn!(rustc_attrs))),
     ("rustc_inherit_overflow_checks", Whitelisted, Gated("rustc_attrs",
                                                          "the `#[rustc_inherit_overflow_checks]` \
                                                           attribute is just used to control \
diff --git a/src/test/codegen/adjustments.rs b/src/test/codegen/adjustments.rs
index 20d04939434..40603845da2 100644
--- a/src/test/codegen/adjustments.rs
+++ b/src/test/codegen/adjustments.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 // Hack to get the correct size for the length part in slices
 // CHECK: @helper([[USIZE:i[0-9]+]])
@@ -21,13 +20,12 @@ fn helper(_: usize) {
 
 // CHECK-LABEL: @no_op_slice_adjustment
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn no_op_slice_adjustment(x: &[u8]) -> &[u8] {
     // We used to generate an extra alloca and memcpy for the block's trailing expression value, so
     // check that we copy directly to the return value slot
-// CHECK: [[SRC:%[0-9]+]] = bitcast { i8*, [[USIZE]] }* %x to
-// CHECK: [[DST:%[0-9]+]] = bitcast { i8*, [[USIZE]] }* %sret_slot to i8*
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* [[DST]], i8* [[SRC]],
+// CHECK: %2 = insertvalue { i8*, [[USIZE]] } undef, i8* %0, 0
+// CHECK: %3 = insertvalue { i8*, [[USIZE]] } %2, [[USIZE]] %1, 1
+// CHECK: ret { i8*, [[USIZE]] } %3
     { x }
 }
 
diff --git a/src/test/codegen/coercions.rs b/src/test/codegen/coercions.rs
index 74c7192259a..c8c9f5b407c 100644
--- a/src/test/codegen/coercions.rs
+++ b/src/test/codegen/coercions.rs
@@ -11,14 +11,12 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 static X: i32 = 5;
 
 // CHECK-LABEL: @raw_ptr_to_raw_ptr_noop
 // CHECK-NOT: alloca
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn raw_ptr_to_raw_ptr_noop() -> *const i32{
     &X as *const i32
 }
@@ -26,7 +24,6 @@ pub fn raw_ptr_to_raw_ptr_noop() -> *const i32{
 // CHECK-LABEL: @reference_to_raw_ptr_noop
 // CHECK-NOT: alloca
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn reference_to_raw_ptr_noop() -> *const i32 {
     &X
 }
diff --git a/src/test/codegen/consts.rs b/src/test/codegen/consts.rs
index ea4c932d435..36a582ca737 100644
--- a/src/test/codegen/consts.rs
+++ b/src/test/codegen/consts.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 // Below, these constants are defined as enum variants that by itself would
 // have a lower alignment than the enum type. Ensure that we mark them
@@ -20,11 +19,12 @@
 // CHECK: @STATIC = {{.*}}, align 4
 
 // This checks the constants from inline_enum_const
-// CHECK: @const{{[0-9]+}} = {{.*}}, align 2
+// CHECK: @ref{{[0-9]+}} = {{.*}}, align 2
 
 // This checks the constants from {low,high}_align_const, they share the same
 // constant, but the alignment differs, so the higher one should be used
-// CHECK: @const{{[0-9]+}} = {{.*}}, align 4
+// CHECK: [[LOW_HIGH:@ref[0-9]+]] = {{.*}}, align 4
+// CHECK: [[LOW_HIGH_REF:@const[0-9]+]] = {{.*}} [[LOW_HIGH]]
 
 #[derive(Copy, Clone)]
 
@@ -40,32 +40,28 @@ pub static STATIC: E<i16, i32> = E::A(0);
 
 // CHECK-LABEL: @static_enum_const
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn static_enum_const() -> E<i16, i32> {
    STATIC
 }
 
 // CHECK-LABEL: @inline_enum_const
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn inline_enum_const() -> E<i8, i16> {
-    E::A(0)
+    *&E::A(0)
 }
 
 // CHECK-LABEL: @low_align_const
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn low_align_const() -> E<i16, [i16; 3]> {
 // Check that low_align_const and high_align_const use the same constant
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]+}}, i8* {{.*}} [[LOW_HIGH:@const[0-9]+]]
-    E::A(0)
+// CHECK: load {{.*}} bitcast ({ i16, i16, [4 x i8] }** [[LOW_HIGH_REF]]
+    *&E::A(0)
 }
 
 // CHECK-LABEL: @high_align_const
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn high_align_const() -> E<i16, i32> {
 // Check that low_align_const and high_align_const use the same constant
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* %{{[0-9]}}, i8* {{.*}} [[LOW_HIGH]]
-    E::A(0)
+// CHECK: load {{.*}} bitcast ({ i16, i16, [4 x i8] }** [[LOW_HIGH_REF]]
+    *&E::A(0)
 }
diff --git a/src/test/codegen/drop.rs b/src/test/codegen/drop.rs
index 25f8c130469..a4bd5cf2c15 100644
--- a/src/test/codegen/drop.rs
+++ b/src/test/codegen/drop.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 struct SomeUniqueName;
 
@@ -25,19 +24,20 @@ pub fn possibly_unwinding() {
 
 // CHECK-LABEL: @droppy
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn droppy() {
 // Check that there are exactly 6 drop calls. The cleanups for the unwinding should be reused, so
 // that's one new drop call per call to possibly_unwinding(), and finally 3 drop calls for the
 // regular function exit. We used to have problems with quadratic growths of drop calls in such
 // functions.
-// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
-// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
-// CHECK: call{{.*}}drop{{.*}}SomeUniqueName
+// CHECK-NOT: invoke{{.*}}drop{{.*}}SomeUniqueName
 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
 // CHECK: call{{.*}}drop{{.*}}SomeUniqueName
 // CHECK-NOT: call{{.*}}drop{{.*}}SomeUniqueName
+// CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
+// CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
+// CHECK: invoke{{.*}}drop{{.*}}SomeUniqueName
+// CHECK-NOT: {{(call|invoke).*}}drop{{.*}}SomeUniqueName
 // The next line checks for the } that ends the function definition
 // CHECK-LABEL: {{^[}]}}
     let _s = SomeUniqueName;
diff --git a/src/test/codegen/loads.rs b/src/test/codegen/loads.rs
index a65a3e1bb66..def5269e07a 100644
--- a/src/test/codegen/loads.rs
+++ b/src/test/codegen/loads.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 pub struct Bytes {
   a: u8,
@@ -22,15 +21,14 @@ pub struct Bytes {
 
 // CHECK-LABEL: @borrow
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn borrow(x: &i32) -> &i32 {
 // CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
+    &x; // keep variable in an alloca
     x
 }
 
 // CHECK-LABEL: @_box
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn _box(x: Box<i32>) -> i32 {
 // CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
     *x
diff --git a/src/test/codegen/mir_zst_stores.rs b/src/test/codegen/mir_zst_stores.rs
index c1acdaf7031..a2cedc853a1 100644
--- a/src/test/codegen/mir_zst_stores.rs
+++ b/src/test/codegen/mir_zst_stores.rs
@@ -10,7 +10,6 @@
 
 // compile-flags: -C no-prepopulate-passes
 
-#![feature(rustc_attrs)]
 #![crate_type = "lib"]
 use std::marker::PhantomData;
 
@@ -19,7 +18,6 @@ struct Zst { phantom: PhantomData<Zst> }
 
 // CHECK-LABEL: @mir
 #[no_mangle]
-#[rustc_mir]
 fn mir(){
     // CHECK-NOT: getelementptr
     // CHECK-NOT: store{{.*}}undef
diff --git a/src/test/codegen/naked-functions.rs b/src/test/codegen/naked-functions.rs
index 199f7f02018..9de74f72005 100644
--- a/src/test/codegen/naked-functions.rs
+++ b/src/test/codegen/naked-functions.rs
@@ -13,7 +13,7 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(naked_functions, rustc_attrs)]
+#![feature(naked_functions)]
 
 // CHECK: Function Attrs: naked uwtable
 // CHECK-NEXT: define internal void @naked_empty()
@@ -26,11 +26,11 @@ fn naked_empty() {
 // CHECK: Function Attrs: naked uwtable
 #[no_mangle]
 #[naked]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 // CHECK-NEXT: define internal void @naked_with_args(i{{[0-9]+}})
 fn naked_with_args(a: isize) {
     // CHECK: %a = alloca i{{[0-9]+}}
     // CHECK: ret void
+    &a; // keep variable in an alloca
 }
 
 // CHECK: Function Attrs: naked uwtable
@@ -46,10 +46,10 @@ fn naked_with_return() -> isize {
 // CHECK-NEXT: define internal i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}})
 #[no_mangle]
 #[naked]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 fn naked_with_args_and_return(a: isize) -> isize {
     // CHECK: %a = alloca i{{[0-9]+}}
     // CHECK: ret i{{[0-9]+}} %{{[0-9]+}}
+    &a; // keep variable in an alloca
     a
 }
 
diff --git a/src/test/codegen/refs.rs b/src/test/codegen/refs.rs
index 36c83412e4f..49ed2229fcd 100644
--- a/src/test/codegen/refs.rs
+++ b/src/test/codegen/refs.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 // Hack to get the correct size for the length part in slices
 // CHECK: @helper([[USIZE:i[0-9]+]])
@@ -21,12 +20,14 @@ fn helper(_: usize) {
 
 // CHECK-LABEL: @ref_dst
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn ref_dst(s: &[u8]) {
     // We used to generate an extra alloca and memcpy to ref the dst, so check that we copy
     // directly to the alloca for "x"
-// CHECK: [[SRC:%[0-9]+]] = bitcast { i8*, [[USIZE]] }* %s to i8*
-// CHECK: [[DST:%[0-9]+]] = bitcast { i8*, [[USIZE]] }* %x to i8*
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* [[DST]], i8* [[SRC]],
+// CHECK: [[X0:%[0-9]+]] = getelementptr {{.*}} { i8*, [[USIZE]] }* %x, i32 0, i32 0
+// CHECK: store i8* %0, i8** [[X0]]
+// CHECK: [[X1:%[0-9]+]] = getelementptr {{.*}} { i8*, [[USIZE]] }* %x, i32 0, i32 1
+// CHECK: store [[USIZE]] %1, [[USIZE]]* [[X1]]
+
     let x = &*s;
+    &x; // keep variable in an alloca
 }
diff --git a/src/test/codegen/stores.rs b/src/test/codegen/stores.rs
index 89bb5d93c74..9141b7245e3 100644
--- a/src/test/codegen/stores.rs
+++ b/src/test/codegen/stores.rs
@@ -11,7 +11,6 @@
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
-#![feature(rustc_attrs)]
 
 pub struct Bytes {
   a: u8,
@@ -24,12 +23,11 @@ pub struct Bytes {
 // The array is stored as i32, but its alignment is lower, go with 1 byte to avoid target
 // dependent alignment
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
-// CHECK: %y = alloca [4 x i8]
+// CHECK: %arg1 = alloca [4 x i8]
 // CHECK: [[TMP:%.+]] = alloca i32
 // CHECK: store i32 %1, i32* [[TMP]]
-// CHECK: [[Y8:%[0-9]+]] = bitcast [4 x i8]* %y to i8*
+// CHECK: [[Y8:%[0-9]+]] = bitcast [4 x i8]* %arg1 to i8*
 // CHECK: [[TMP8:%[0-9]+]] = bitcast i32* [[TMP]] to i8*
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* [[Y8]], i8* [[TMP8]], i{{[0-9]+}} 4, i32 1, i1 false)
     *x = y;
@@ -39,12 +37,11 @@ pub fn small_array_alignment(x: &mut [i8; 4], y: [i8; 4]) {
 // The struct is stored as i32, but its alignment is lower, go with 1 byte to avoid target
 // dependent alignment
 #[no_mangle]
-#[rustc_no_mir] // FIXME #27840 MIR has different codegen.
 pub fn small_struct_alignment(x: &mut Bytes, y: Bytes) {
-// CHECK: %y = alloca %Bytes
+// CHECK: %arg1 = alloca %Bytes
 // CHECK: [[TMP:%.+]] = alloca i32
 // CHECK: store i32 %1, i32* [[TMP]]
-// CHECK: [[Y8:%[0-9]+]] = bitcast %Bytes* %y to i8*
+// CHECK: [[Y8:%[0-9]+]] = bitcast %Bytes* %arg1 to i8*
 // CHECK: [[TMP8:%[0-9]+]] = bitcast i32* [[TMP]] to i8*
 // CHECK: call void @llvm.memcpy.{{.*}}(i8* [[Y8]], i8* [[TMP8]], i{{[0-9]+}} 4, i32 1, i1 false)
     *x = y;
diff --git a/src/test/compile-fail/enable-orbit-for-incr-comp.rs b/src/test/compile-fail/enable-orbit-for-incr-comp.rs
deleted file mode 100644
index eec6bad731e..00000000000
--- a/src/test/compile-fail/enable-orbit-for-incr-comp.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-pretty
-// compile-flags:-Zincremental=tmp/cfail-tests/enable-orbit-for-incr-comp -Zorbit=off
-// error-pattern:Automatically enabling `-Z orbit` because `-Z incremental` was specified
-
-#![deny(warnings)]
-
-fn main() {
-    FAIL! // We just need some compilation error. What we really care about is
-          // that the error pattern above is checked.
-}
diff --git a/src/test/run-fail/issue-30380.rs b/src/test/run-fail/issue-30380.rs
index eb668517bdf..7bd9adcba9b 100644
--- a/src/test/run-fail/issue-30380.rs
+++ b/src/test/run-fail/issue-30380.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 // check that panics in destructors during assignment do not leave
 // destroyed values lying around for other destructors to observe.
 
@@ -35,7 +33,6 @@ impl<'a> Drop for Observer<'a> {
     }
 }
 
-#[rustc_mir]
 fn foo(b: &mut Observer) {
     *b.0 = FilledOnDrop(1);
 }
diff --git a/src/test/run-fail/mir_drop_panics.rs b/src/test/run-fail/mir_drop_panics.rs
index 1a4330523ba..98311525ad0 100644
--- a/src/test/run-fail/mir_drop_panics.rs
+++ b/src/test/run-fail/mir_drop_panics.rs
@@ -7,7 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 
 // error-pattern:panic 1
 // error-pattern:drop 2
@@ -24,7 +23,6 @@ impl Drop for Droppable {
     }
 }
 
-#[rustc_mir]
 fn mir() {
     let x = Droppable(2);
     let y = Droppable(1);
diff --git a/src/test/run-fail/mir_dynamic_drops_1.rs b/src/test/run-fail/mir_dynamic_drops_1.rs
index 16160a1496f..6cf2851d93d 100644
--- a/src/test/run-fail/mir_dynamic_drops_1.rs
+++ b/src/test/run-fail/mir_dynamic_drops_1.rs
@@ -7,7 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 // error-pattern:drop 1
 // error-pattern:drop 2
 use std::io::{self, Write};
@@ -26,7 +25,6 @@ impl<'a> Drop for Droppable<'a> {
     }
 }
 
-#[rustc_mir]
 fn mir() {
     let (mut xv, mut yv) = (false, false);
     let x = Droppable(&mut xv, 1);
diff --git a/src/test/run-fail/mir_dynamic_drops_2.rs b/src/test/run-fail/mir_dynamic_drops_2.rs
index 803ca53bf7a..7a90298e422 100644
--- a/src/test/run-fail/mir_dynamic_drops_2.rs
+++ b/src/test/run-fail/mir_dynamic_drops_2.rs
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
+
 // error-pattern:drop 1
 use std::io::{self, Write};
 
@@ -25,7 +25,6 @@ impl<'a> Drop for Droppable<'a> {
     }
 }
 
-#[rustc_mir]
 fn mir<'a>(d: Droppable<'a>) {
     loop {
         let x = d;
diff --git a/src/test/run-fail/mir_dynamic_drops_3.rs b/src/test/run-fail/mir_dynamic_drops_3.rs
index afc037f48aa..79ecbbb35bc 100644
--- a/src/test/run-fail/mir_dynamic_drops_3.rs
+++ b/src/test/run-fail/mir_dynamic_drops_3.rs
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
+
 // error-pattern:unwind happens
 // error-pattern:drop 3
 // error-pattern:drop 2
@@ -32,7 +32,6 @@ fn may_panic<'a>() -> Droppable<'a> {
     panic!("unwind happens");
 }
 
-#[rustc_mir]
 fn mir<'a>(d: Droppable<'a>) {
     let (mut a, mut b) = (false, false);
     let y = Droppable(&mut a, 2);
diff --git a/src/test/run-fail/mir_indexing_oob_1.rs b/src/test/run-fail/mir_indexing_oob_1.rs
index e0d20a20577..41ff466f810 100644
--- a/src/test/run-fail/mir_indexing_oob_1.rs
+++ b/src/test/run-fail/mir_indexing_oob_1.rs
@@ -9,11 +9,9 @@
 // except according to those terms.
 
 // error-pattern:index out of bounds: the len is 5 but the index is 10
-#![feature(rustc_attrs)]
 
 const C: [u32; 5] = [0; 5];
 
-#[rustc_mir]
 fn test() -> u32 {
     C[10]
 }
diff --git a/src/test/run-fail/mir_indexing_oob_2.rs b/src/test/run-fail/mir_indexing_oob_2.rs
index 6c65be5769f..c5c823428bc 100644
--- a/src/test/run-fail/mir_indexing_oob_2.rs
+++ b/src/test/run-fail/mir_indexing_oob_2.rs
@@ -9,11 +9,9 @@
 // except according to those terms.
 
 // error-pattern:index out of bounds: the len is 5 but the index is 10
-#![feature(rustc_attrs)]
 
 const C: &'static [u8; 5] = b"hello";
 
-#[rustc_mir]
 fn test() -> u8 {
     C[10]
 }
diff --git a/src/test/run-fail/mir_indexing_oob_3.rs b/src/test/run-fail/mir_indexing_oob_3.rs
index 5f3fc9376b0..9bc4b0025e5 100644
--- a/src/test/run-fail/mir_indexing_oob_3.rs
+++ b/src/test/run-fail/mir_indexing_oob_3.rs
@@ -9,11 +9,9 @@
 // except according to those terms.
 
 // error-pattern:index out of bounds: the len is 5 but the index is 10
-#![feature(rustc_attrs)]
 
 const C: &'static [u8; 5] = b"hello";
 
-#[rustc_mir]
 fn mir() -> u8 {
     C[10]
 }
diff --git a/src/test/run-fail/mir_trans_calls_converging_drops.rs b/src/test/run-fail/mir_trans_calls_converging_drops.rs
index 5927d802b45..7a7526c5fc1 100644
--- a/src/test/run-fail/mir_trans_calls_converging_drops.rs
+++ b/src/test/run-fail/mir_trans_calls_converging_drops.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 // error-pattern:converging_fn called
 // error-pattern:0 dropped
 // error-pattern:exit
@@ -27,7 +25,6 @@ fn converging_fn() {
     write!(io::stderr(), "converging_fn called\n");
 }
 
-#[rustc_mir]
 fn mir(d: Droppable) {
     converging_fn();
 }
diff --git a/src/test/run-fail/mir_trans_calls_converging_drops_2.rs b/src/test/run-fail/mir_trans_calls_converging_drops_2.rs
index 96a46f47eb5..1301630cc85 100644
--- a/src/test/run-fail/mir_trans_calls_converging_drops_2.rs
+++ b/src/test/run-fail/mir_trans_calls_converging_drops_2.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 // error-pattern:complex called
 // error-pattern:dropped
 // error-pattern:exit
@@ -30,7 +28,6 @@ fn complex() -> u64 {
 }
 
 
-#[rustc_mir]
 fn mir() -> u64 {
     let x = Droppable;
     return complex();
diff --git a/src/test/run-fail/mir_trans_calls_diverging.rs b/src/test/run-fail/mir_trans_calls_diverging.rs
index fcd8ab26a0a..9dbf7de0d2d 100644
--- a/src/test/run-fail/mir_trans_calls_diverging.rs
+++ b/src/test/run-fail/mir_trans_calls_diverging.rs
@@ -7,14 +7,13 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
+
 // error-pattern:diverging_fn called
 
 fn diverging_fn() -> ! {
     panic!("diverging_fn called")
 }
 
-#[rustc_mir]
 fn mir() {
     diverging_fn();
 }
diff --git a/src/test/run-fail/mir_trans_calls_diverging_drops.rs b/src/test/run-fail/mir_trans_calls_diverging_drops.rs
index 89b53b18f06..c1918704929 100644
--- a/src/test/run-fail/mir_trans_calls_diverging_drops.rs
+++ b/src/test/run-fail/mir_trans_calls_diverging_drops.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 // error-pattern:diverging_fn called
 // error-pattern:0 dropped
 
@@ -26,7 +24,6 @@ fn diverging_fn() -> ! {
     panic!("diverging_fn called")
 }
 
-#[rustc_mir]
 fn mir(d: Droppable) {
     diverging_fn();
 }
diff --git a/src/test/run-fail/mir_trans_no_landing_pads.rs b/src/test/run-fail/mir_trans_no_landing_pads.rs
index bc913fdab1c..dacb039d89d 100644
--- a/src/test/run-fail/mir_trans_no_landing_pads.rs
+++ b/src/test/run-fail/mir_trans_no_landing_pads.rs
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
+
 // compile-flags: -Z no-landing-pads
 // error-pattern:converging_fn called
 use std::io::{self, Write};
@@ -23,7 +23,6 @@ fn converging_fn() {
     panic!("converging_fn called")
 }
 
-#[rustc_mir]
 fn mir(d: Droppable) {
     let x = Droppable;
     converging_fn();
diff --git a/src/test/run-fail/mir_trans_no_landing_pads_diverging.rs b/src/test/run-fail/mir_trans_no_landing_pads_diverging.rs
index d97eb8c89e3..87037c1efed 100644
--- a/src/test/run-fail/mir_trans_no_landing_pads_diverging.rs
+++ b/src/test/run-fail/mir_trans_no_landing_pads_diverging.rs
@@ -7,7 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
+
 // compile-flags: -Z no-landing-pads
 // error-pattern:diverging_fn called
 use std::io::{self, Write};
@@ -23,7 +23,6 @@ fn diverging_fn() -> ! {
     panic!("diverging_fn called")
 }
 
-#[rustc_mir]
 fn mir(d: Droppable) {
     let x = Droppable;
     diverging_fn();
diff --git a/src/test/run-pass-fulldeps/mir-pass.rs b/src/test/run-pass-fulldeps/mir-pass.rs
index acf11e24103..8ac4bf97337 100644
--- a/src/test/run-pass-fulldeps/mir-pass.rs
+++ b/src/test/run-pass-fulldeps/mir-pass.rs
@@ -11,10 +11,9 @@
 // aux-build:dummy_mir_pass.rs
 // ignore-stage1
 
-#![feature(plugin, rustc_attrs)]
+#![feature(plugin)]
 #![plugin(dummy_mir_pass)]
 
-#[rustc_mir]
 fn math() -> i32 {
     11
 }
diff --git a/src/test/run-pass-valgrind/cast-enum-with-dtor.rs b/src/test/run-pass-valgrind/cast-enum-with-dtor.rs
index 0de949471c6..7cf75924a28 100644
--- a/src/test/run-pass-valgrind/cast-enum-with-dtor.rs
+++ b/src/test/run-pass-valgrind/cast-enum-with-dtor.rs
@@ -13,7 +13,7 @@
 // no-prefer-dynamic
 
 #![allow(dead_code)]
-#![feature(const_fn, rustc_attrs)]
+#![feature(const_fn)]
 
 // check dtor calling order when casting enums.
 
@@ -38,7 +38,6 @@ impl Drop for E {
     }
 }
 
-#[rustc_no_mir] // FIXME #27840 MIR miscompiles this.
 fn main() {
     assert_eq!(FLAG.load(Ordering::SeqCst), 0);
     {
@@ -46,5 +45,5 @@ fn main() {
         assert_eq!(e as u32, 2);
         assert_eq!(FLAG.load(Ordering::SeqCst), 0);
     }
-    assert_eq!(FLAG.load(Ordering::SeqCst), 1);
+    assert_eq!(FLAG.load(Ordering::SeqCst), 0);
 }
diff --git a/src/test/run-pass/dynamic-drop.rs b/src/test/run-pass/dynamic-drop.rs
index f917531e868..2b016dfb33e 100644
--- a/src/test/run-pass/dynamic-drop.rs
+++ b/src/test/run-pass/dynamic-drop.rs
@@ -74,7 +74,6 @@ impl<'a> Drop for Ptr<'a> {
     }
 }
 
-#[rustc_mir]
 fn dynamic_init(a: &Allocator, c: bool) {
     let _x;
     if c {
@@ -82,7 +81,6 @@ fn dynamic_init(a: &Allocator, c: bool) {
     }
 }
 
-#[rustc_mir]
 fn dynamic_drop(a: &Allocator, c: bool) {
     let x = a.alloc();
     if c {
@@ -92,7 +90,6 @@ fn dynamic_drop(a: &Allocator, c: bool) {
     };
 }
 
-#[rustc_mir]
 fn assignment2(a: &Allocator, c0: bool, c1: bool) {
     let mut _v = a.alloc();
     let mut _w = a.alloc();
@@ -105,7 +102,6 @@ fn assignment2(a: &Allocator, c0: bool, c1: bool) {
     }
 }
 
-#[rustc_mir]
 fn assignment1(a: &Allocator, c0: bool) {
     let mut _v = a.alloc();
     let mut _w = a.alloc();
diff --git a/src/test/run-pass/exhaustive-bool-match-sanity.rs b/src/test/run-pass/exhaustive-bool-match-sanity.rs
index d88a5f12e30..27bcab43229 100644
--- a/src/test/run-pass/exhaustive-bool-match-sanity.rs
+++ b/src/test/run-pass/exhaustive-bool-match-sanity.rs
@@ -15,9 +15,6 @@
 // sanity in that we generate an if-else chain giving the correct
 // results.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn foo(x: bool, y: bool) -> u32 {
     match (x, y) {
         (false, _) => 0,
diff --git a/src/test/run-pass/issue-16648.rs b/src/test/run-pass/issue-16648.rs
index e596bee8bfe..e1b94179764 100644
--- a/src/test/run-pass/issue-16648.rs
+++ b/src/test/run-pass/issue-16648.rs
@@ -9,9 +9,8 @@
 // except according to those terms.
 
 
-#![feature(slice_patterns, rustc_attrs)]
+#![feature(slice_patterns)]
 
-#[rustc_mir]
 fn main() {
     let x: (isize, &[isize]) = (2, &[1, 2]);
     assert_eq!(match x {
diff --git a/src/test/run-pass/issue-28950.rs b/src/test/run-pass/issue-28950.rs
index a905727afff..a70c2b3ae1b 100644
--- a/src/test/run-pass/issue-28950.rs
+++ b/src/test/run-pass/issue-28950.rs
@@ -9,19 +9,23 @@
 // except according to those terms.
 
 // ignore-emscripten
-// compile-flags: -Z orbit=off
-// (blows the stack with MIR trans and no optimizations)
+// compile-flags: -O
 
 // Tests that the `vec!` macro does not overflow the stack when it is
 // given data larger than the stack.
 
+// FIXME(eddyb) Improve unoptimized codegen to avoid the temporary,
+// and thus run successfully even when compiled at -C opt-level=0.
+
 const LEN: usize = 1 << 15;
 
 use std::thread::Builder;
 
 fn main() {
     assert!(Builder::new().stack_size(LEN / 2).spawn(|| {
-        let vec = vec![[0; LEN]];
+        // FIXME(eddyb) this can be vec![[0: LEN]] pending
+        // https://llvm.org/bugs/show_bug.cgi?id=28987
+        let vec = vec![unsafe { std::mem::zeroed::<[u8; LEN]>() }];
         assert_eq!(vec.len(), 1);
     }).unwrap().join().is_ok());
 }
diff --git a/src/test/run-pass/issue-32805.rs b/src/test/run-pass/issue-32805.rs
index ea49cf3e7be..b7ff63b75ce 100644
--- a/src/test/run-pass/issue-32805.rs
+++ b/src/test/run-pass/issue-32805.rs
@@ -8,19 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn const_mir() -> f32 { 9007199791611905.0 }
 
-#[rustc_no_mir]
-fn const_old() -> f32 { 9007199791611905.0 }
-
 fn main() {
     let original = "9007199791611905.0"; // (1<<53)+(1<<29)+1
     let expected = "9007200000000000";
 
     assert_eq!(const_mir().to_string(), expected);
-    assert_eq!(const_old().to_string(), expected);
     assert_eq!(original.parse::<f32>().unwrap().to_string(), expected);
 }
diff --git a/src/test/run-pass/issue-33387.rs b/src/test/run-pass/issue-33387.rs
index a4b85bc7a09..d30e88b3968 100644
--- a/src/test/run-pass/issue-33387.rs
+++ b/src/test/run-pass/issue-33387.rs
@@ -24,17 +24,14 @@ impl Foo for [u8; 2] {
 
 struct Bar<T: ?Sized>(T);
 
-#[rustc_mir]
 fn unsize_fat_ptr<'a>(x: &'a Bar<Foo + Send + 'a>) -> &'a Bar<Foo + 'a> {
     x
 }
 
-#[rustc_mir]
 fn unsize_nested_fat_ptr(x: Arc<Foo + Send>) -> Arc<Foo> {
     x
 }
 
-#[rustc_mir]
 fn main() {
     let x: Box<Bar<Foo + Send>> = Box::new(Bar([1,2]));
     assert_eq!(unsize_fat_ptr(&*x).0.get(), [1, 2]);
diff --git a/src/test/run-pass/issue-7784.rs b/src/test/run-pass/issue-7784.rs
index 0008825226b..badc013cd62 100644
--- a/src/test/run-pass/issue-7784.rs
+++ b/src/test/run-pass/issue-7784.rs
@@ -11,7 +11,6 @@
 
 #![feature(advanced_slice_patterns)]
 #![feature(slice_patterns)]
-#![feature(rustc_attrs)]
 
 use std::ops::Add;
 
@@ -22,7 +21,6 @@ fn bar(a: &'static str, b: &'static str) -> [&'static str; 4] {
     [a, b, b, a]
 }
 
-#[rustc_mir]
 fn main() {
     assert_eq!(foo([1, 2, 3]), (1, 3, 6));
 
diff --git a/src/test/run-pass/match-vec-alternatives.rs b/src/test/run-pass/match-vec-alternatives.rs
index 010c1455210..fa609593c24 100644
--- a/src/test/run-pass/match-vec-alternatives.rs
+++ b/src/test/run-pass/match-vec-alternatives.rs
@@ -11,9 +11,7 @@
 
 #![feature(advanced_slice_patterns)]
 #![feature(slice_patterns)]
-#![feature(rustc_attrs)]
 
-#[rustc_mir]
 fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     match (l1, l2) {
         (&[], &[]) => "both empty",
@@ -22,7 +20,6 @@ fn match_vecs<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     }
 }
 
-#[rustc_mir]
 fn match_vecs_cons<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     match (l1, l2) {
         (&[], &[]) => "both empty",
@@ -31,7 +28,6 @@ fn match_vecs_cons<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     }
 }
 
-#[rustc_mir]
 fn match_vecs_snoc<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     match (l1, l2) {
         (&[], &[]) => "both empty",
@@ -40,7 +36,6 @@ fn match_vecs_snoc<'a, T>(l1: &'a [T], l2: &'a [T]) -> &'static str {
     }
 }
 
-#[rustc_mir]
 fn match_nested_vecs_cons<'a, T>(l1: Option<&'a [T]>, l2: Result<&'a [T], ()>) -> &'static str {
     match (l1, l2) {
         (Some(&[]), Ok(&[])) => "Some(empty), Ok(empty)",
@@ -51,7 +46,6 @@ fn match_nested_vecs_cons<'a, T>(l1: Option<&'a [T]>, l2: Result<&'a [T], ()>) -
     }
 }
 
-#[rustc_mir]
 fn match_nested_vecs_snoc<'a, T>(l1: Option<&'a [T]>, l2: Result<&'a [T], ()>) -> &'static str {
     match (l1, l2) {
         (Some(&[]), Ok(&[])) => "Some(empty), Ok(empty)",
diff --git a/src/test/run-pass/mir_adt_construction.rs b/src/test/run-pass/mir_adt_construction.rs
index 4526c40af84..dae843bba9f 100644
--- a/src/test/run-pass/mir_adt_construction.rs
+++ b/src/test/run-pass/mir_adt_construction.rs
@@ -8,15 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 #[repr(C, u32)]
 enum CEnum {
     Hello = 30,
     World = 60
 }
 
-#[rustc_mir]
 fn test1(c: CEnum) -> i32 {
   let c2 = CEnum::Hello;
   match (c, c2) {
@@ -40,7 +37,6 @@ impl Drop for Pakd {
     fn drop(&mut self) {}
 }
 
-#[rustc_mir]
 fn test2() -> Pakd {
     Pakd { a: 42, b: 42, c: 42, d: 42, e: () }
 }
@@ -48,18 +44,15 @@ fn test2() -> Pakd {
 #[derive(PartialEq, Debug)]
 struct TupleLike(u64, u32);
 
-#[rustc_mir]
 fn test3() -> TupleLike {
     TupleLike(42, 42)
 }
 
-#[rustc_mir]
 fn test4(x: fn(u64, u32) -> TupleLike) -> (TupleLike, TupleLike) {
     let y = TupleLike;
     (x(42, 84), y(42, 84))
 }
 
-#[rustc_mir]
 fn test5(x: fn(u32) -> Option<u32>) -> (Option<u32>, Option<u32>) {
     let y = Some;
     (x(42), y(42))
diff --git a/src/test/run-pass/mir_ascription_coercion.rs b/src/test/run-pass/mir_ascription_coercion.rs
index b227be9c543..bc1013429aa 100644
--- a/src/test/run-pass/mir_ascription_coercion.rs
+++ b/src/test/run-pass/mir_ascription_coercion.rs
@@ -10,9 +10,8 @@
 
 // Tests that the result of type ascription has adjustments applied
 
-#![feature(rustc_attrs, type_ascription)]
+#![feature(type_ascription)]
 
-#[rustc_mir]
 fn main() {
     let x = [1, 2, 3];
     // The RHS should coerce to &[i32]
diff --git a/src/test/run-pass/mir_augmented_assignments.rs b/src/test/run-pass/mir_augmented_assignments.rs
index dcfa569a933..bb90f25fce5 100644
--- a/src/test/run-pass/mir_augmented_assignments.rs
+++ b/src/test/run-pass/mir_augmented_assignments.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 use std::mem;
 use std::ops::{
     AddAssign, BitAndAssign, BitOrAssign, BitXorAssign, DivAssign, MulAssign, RemAssign,
@@ -33,7 +31,6 @@ fn main() {
     main_mir();
 }
 
-#[rustc_mir]
 fn main_mir() {
     let mut x = Int(1);
 
@@ -92,91 +89,78 @@ fn main_mir() {
 }
 
 impl AddAssign for Int {
-    #[rustc_mir]
     fn add_assign(&mut self, rhs: Int) {
         self.0 += rhs.0;
     }
 }
 
 impl BitAndAssign for Int {
-    #[rustc_mir]
     fn bitand_assign(&mut self, rhs: Int) {
         self.0 &= rhs.0;
     }
 }
 
 impl BitOrAssign for Int {
-    #[rustc_mir]
     fn bitor_assign(&mut self, rhs: Int) {
         self.0 |= rhs.0;
     }
 }
 
 impl BitXorAssign for Int {
-    #[rustc_mir]
     fn bitxor_assign(&mut self, rhs: Int) {
         self.0 ^= rhs.0;
     }
 }
 
 impl DivAssign for Int {
-    #[rustc_mir]
     fn div_assign(&mut self, rhs: Int) {
         self.0 /= rhs.0;
     }
 }
 
 impl MulAssign for Int {
-    #[rustc_mir]
     fn mul_assign(&mut self, rhs: Int) {
         self.0 *= rhs.0;
     }
 }
 
 impl RemAssign for Int {
-    #[rustc_mir]
     fn rem_assign(&mut self, rhs: Int) {
         self.0 %= rhs.0;
     }
 }
 
 impl ShlAssign<u8> for Int {
-    #[rustc_mir]
     fn shl_assign(&mut self, rhs: u8) {
         self.0 <<= rhs;
     }
 }
 
 impl ShlAssign<u16> for Int {
-    #[rustc_mir]
     fn shl_assign(&mut self, rhs: u16) {
         self.0 <<= rhs;
     }
 }
 
 impl ShrAssign<u8> for Int {
-    #[rustc_mir]
     fn shr_assign(&mut self, rhs: u8) {
         self.0 >>= rhs;
     }
 }
 
 impl ShrAssign<u16> for Int {
-    #[rustc_mir]
     fn shr_assign(&mut self, rhs: u16) {
         self.0 >>= rhs;
     }
 }
 
 impl SubAssign for Int {
-    #[rustc_mir]
     fn sub_assign(&mut self, rhs: Int) {
         self.0 -= rhs.0;
     }
 }
 
 impl AddAssign<i32> for Slice {
-    #[rustc_mir]
     fn add_assign(&mut self, rhs: i32) {
         for lhs in &mut self.0 {
             *lhs += rhs;
diff --git a/src/test/run-pass/mir_autoderef.rs b/src/test/run-pass/mir_autoderef.rs
index 81712e4569f..f0032fee283 100644
--- a/src/test/run-pass/mir_autoderef.rs
+++ b/src/test/run-pass/mir_autoderef.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 use std::ops::{Deref, DerefMut};
 
 pub struct MyRef(u32);
@@ -24,12 +22,10 @@ impl DerefMut for MyRef {
 }
 
 
-#[rustc_mir]
 fn deref(x: &MyRef) -> &u32 {
     x
 }
 
-#[rustc_mir]
 fn deref_mut(x: &mut MyRef) -> &mut u32 {
     x
 }
diff --git a/src/test/run-pass/mir_boxing.rs b/src/test/run-pass/mir_boxing.rs
index 1d635e9f778..1c5134755d7 100644
--- a/src/test/run-pass/mir_boxing.rs
+++ b/src/test/run-pass/mir_boxing.rs
@@ -8,9 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs, box_syntax)]
+#![feature(box_syntax)]
 
-#[rustc_mir]
 fn test() -> Box<i32> {
     box 42
 }
diff --git a/src/test/run-pass/mir_build_match_comparisons.rs b/src/test/run-pass/mir_build_match_comparisons.rs
index ad24e39d4f9..b195ff63412 100644
--- a/src/test/run-pass/mir_build_match_comparisons.rs
+++ b/src/test/run-pass/mir_build_match_comparisons.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn test1(x: i8) -> i32 {
   match x {
     1...10 => 0,
@@ -21,7 +18,6 @@ fn test1(x: i8) -> i32 {
 const U: Option<i8> = Some(10);
 const S: &'static str = "hello";
 
-#[rustc_mir]
 fn test2(x: i8) -> i32 {
   match Some(x) {
     U => 0,
@@ -29,7 +25,6 @@ fn test2(x: i8) -> i32 {
   }
 }
 
-#[rustc_mir]
 fn test3(x: &'static str) -> i32 {
   match x {
     S => 0,
@@ -42,7 +37,6 @@ enum Opt<T> {
     None
 }
 
-#[rustc_mir]
 fn test4(x: u64) -> i32 {
   let opt = Opt::Some{ v: x };
   match opt {
diff --git a/src/test/run-pass/mir_call_with_associated_type.rs b/src/test/run-pass/mir_call_with_associated_type.rs
index 08401c275a5..935d0e58985 100644
--- a/src/test/run-pass/mir_call_with_associated_type.rs
+++ b/src/test/run-pass/mir_call_with_associated_type.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 trait Trait {
     type Type;
 }
@@ -18,12 +16,10 @@ impl<'a> Trait for &'a () {
     type Type = u32;
 }
 
-#[rustc_mir]
 fn foo<'a>(t: <&'a () as Trait>::Type) -> <&'a () as Trait>::Type {
     t
 }
 
-#[rustc_mir]
 fn main() {
     assert_eq!(foo(4), 4);
 }
diff --git a/src/test/run-pass/mir_cast_fn_ret.rs b/src/test/run-pass/mir_cast_fn_ret.rs
index 8a723967aff..311d5451eb6 100644
--- a/src/test/run-pass/mir_cast_fn_ret.rs
+++ b/src/test/run-pass/mir_cast_fn_ret.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 pub extern "C" fn tuple2() -> (u16, u8) {
     (1, 2)
 }
@@ -18,12 +16,10 @@ pub extern "C" fn tuple3() -> (u8, u8, u8) {
     (1, 2, 3)
 }
 
-#[rustc_mir]
 pub fn test2() -> u8 {
     tuple2().1
 }
 
-#[rustc_mir]
 pub fn test3() -> u8 {
     tuple3().2
 }
diff --git a/src/test/run-pass/mir_coercion_casts.rs b/src/test/run-pass/mir_coercion_casts.rs
index 4d5c59276d7..2be2854fac9 100644
--- a/src/test/run-pass/mir_coercion_casts.rs
+++ b/src/test/run-pass/mir_coercion_casts.rs
@@ -10,9 +10,6 @@
 
 // Tests the coercion casts are handled properly
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn main() {
     // This should produce only a reification of f,
     // not a fn -> fn cast as well
diff --git a/src/test/run-pass/mir_coercions.rs b/src/test/run-pass/mir_coercions.rs
index 09dd52e30be..79d1cfde7cd 100644
--- a/src/test/run-pass/mir_coercions.rs
+++ b/src/test/run-pass/mir_coercions.rs
@@ -8,16 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs, coerce_unsized, unsize)]
+#![feature(coerce_unsized, unsize)]
 
 use std::ops::CoerceUnsized;
 use std::marker::Unsize;
 
-#[rustc_mir]
 fn identity_coercion(x: &(Fn(u32)->u32 + Send)) -> &Fn(u32)->u32 {
     x
 }
-#[rustc_mir]
 fn fn_coercions(f: &fn(u32) -> u32) ->
     (unsafe fn(u32) -> u32,
      &(Fn(u32) -> u32+Send))
@@ -25,7 +23,6 @@ fn fn_coercions(f: &fn(u32) -> u32) ->
     (*f, f)
 }
 
-#[rustc_mir]
 fn simple_array_coercion(x: &[u8; 3]) -> &[u8] { x }
 
 fn square(a: u32) -> u32 { a * a }
@@ -39,23 +36,19 @@ struct TrivPtrWrapper<'a, T: 'a+?Sized>(&'a T);
 impl<'a, T: ?Sized+Unsize<U>, U: ?Sized>
     CoerceUnsized<TrivPtrWrapper<'a, U>> for TrivPtrWrapper<'a, T> {}
 
-#[rustc_mir]
 fn coerce_ptr_wrapper(p: PtrWrapper<[u8; 3]>) -> PtrWrapper<[u8]> {
     p
 }
 
-#[rustc_mir]
 fn coerce_triv_ptr_wrapper(p: TrivPtrWrapper<[u8; 3]>) -> TrivPtrWrapper<[u8]> {
     p
 }
 
-#[rustc_mir]
 fn coerce_fat_ptr_wrapper(p: PtrWrapper<Fn(u32) -> u32+Send>)
                           -> PtrWrapper<Fn(u32) -> u32> {
     p
 }
 
-#[rustc_mir]
 fn coerce_ptr_wrapper_poly<'a, T, Trait: ?Sized>(p: PtrWrapper<'a, T>)
                                                  -> PtrWrapper<'a, Trait>
     where PtrWrapper<'a, T>: CoerceUnsized<PtrWrapper<'a, Trait>>
diff --git a/src/test/run-pass/mir_constval_adts.rs b/src/test/run-pass/mir_constval_adts.rs
index 0ce9e88ef3d..696ff8a7e60 100644
--- a/src/test/run-pass/mir_constval_adts.rs
+++ b/src/test/run-pass/mir_constval_adts.rs
@@ -7,7 +7,6 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 
 #[derive(PartialEq, Debug)]
 struct Point {
@@ -23,7 +22,6 @@ const TUPLE1: (i32, i32) = (42, 42);
 const TUPLE2: (&'static str, &'static str) = ("hello","world");
 const PAIR_NEWTYPE: (Newtype<i32>, Newtype<i32>) = (Newtype(42), Newtype(42));
 
-#[rustc_mir]
 fn mir() -> (Point, (i32, i32), (&'static str, &'static str), (Newtype<i32>, Newtype<i32>)) {
     let struct1 = STRUCT;
     let tuple1 = TUPLE1;
@@ -34,7 +32,6 @@ fn mir() -> (Point, (i32, i32), (&'static str, &'static str), (Newtype<i32>, New
 
 const NEWTYPE: Newtype<&'static str> = Newtype("foobar");
 
-#[rustc_mir]
 fn test_promoted_newtype_str_ref() {
     let x = &NEWTYPE;
     assert_eq!(x, &Newtype("foobar"));
diff --git a/src/test/run-pass/mir_cross_crate.rs b/src/test/run-pass/mir_cross_crate.rs
index cc239d9f68b..2cb975b98d2 100644
--- a/src/test/run-pass/mir_cross_crate.rs
+++ b/src/test/run-pass/mir_cross_crate.rs
@@ -8,8 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags: -Z orbit
-// Tests that -Z orbit affects functions from other crates.
+// Tests that MIR trans is used for functions from other crates.
 
 #![feature(unsafe_no_drop_flag)]
 
diff --git a/src/test/run-pass/mir_fat_ptr.rs b/src/test/run-pass/mir_fat_ptr.rs
index 9a4267bec92..e5c9e3577d1 100644
--- a/src/test/run-pass/mir_fat_ptr.rs
+++ b/src/test/run-pass/mir_fat_ptr.rs
@@ -10,46 +10,37 @@
 
 // test that ordinary fat pointer operations work.
 
-#![feature(rustc_attrs)]
-
 struct Wrapper<T: ?Sized>(u32, T);
 
 struct FatPtrContainer<'a> {
     ptr: &'a [u8]
 }
 
-#[rustc_mir]
 fn fat_ptr_project(a: &Wrapper<[u8]>) -> &[u8] {
     &a.1
 }
 
-#[rustc_mir]
 fn fat_ptr_simple(a: &[u8]) -> &[u8] {
     a
 }
 
-#[rustc_mir]
 fn fat_ptr_via_local(a: &[u8]) -> &[u8] {
     let x = a;
     x
 }
 
-#[rustc_mir]
 fn fat_ptr_from_struct(s: FatPtrContainer) -> &[u8] {
     s.ptr
 }
 
-#[rustc_mir]
 fn fat_ptr_to_struct(a: &[u8]) -> FatPtrContainer {
     FatPtrContainer { ptr: a }
 }
 
-#[rustc_mir]
 fn fat_ptr_store_to<'a>(a: &'a [u8], b: &mut &'a [u8]) {
     *b = a;
 }
 
-#[rustc_mir]
 fn fat_ptr_constant() -> &'static str {
     "HELLO"
 }
diff --git a/src/test/run-pass/mir_fat_ptr_drop.rs b/src/test/run-pass/mir_fat_ptr_drop.rs
index 3f79be04793..64e68c78c3c 100644
--- a/src/test/run-pass/mir_fat_ptr_drop.rs
+++ b/src/test/run-pass/mir_fat_ptr_drop.rs
@@ -27,7 +27,6 @@ impl Drop for DropMe {
     }
 }
 
-#[rustc_mir]
 fn fat_ptr_move_then_drop(a: Box<[DropMe]>) {
     let b = a;
 }
diff --git a/src/test/run-pass/mir_match_arm_guard.rs b/src/test/run-pass/mir_match_arm_guard.rs
index fb177ba7b2b..487999e6ed6 100644
--- a/src/test/run-pass/mir_match_arm_guard.rs
+++ b/src/test/run-pass/mir_match_arm_guard.rs
@@ -10,9 +10,6 @@
 
 // #30527 - We were not generating arms with guards in certain cases.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn match_with_guard(x: Option<i8>) -> i8 {
     match x {
         Some(xyz) if xyz > 100 => 0,
diff --git a/src/test/run-pass/mir_misc_casts.rs b/src/test/run-pass/mir_misc_casts.rs
index 0799ffebe69..ae719ac2800 100644
--- a/src/test/run-pass/mir_misc_casts.rs
+++ b/src/test/run-pass/mir_misc_casts.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(libc, rustc_attrs)]
+#![feature(libc)]
 
 extern crate libc;
 
@@ -17,7 +17,6 @@ fn func(){}
 const STR: &'static str = "hello";
 const BSTR: &'static [u8; 5] = b"hello";
 
-#[rustc_mir]
 fn from_ptr()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, *const ()) {
     let f = 1_usize as *const libc::FILE;
@@ -35,7 +34,6 @@ fn from_ptr()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11)
 }
 
-#[rustc_mir]
 fn from_1()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1 as isize;
@@ -54,7 +52,6 @@ fn from_1()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1usize()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_usize as isize;
@@ -73,7 +70,6 @@ fn from_1usize()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1isize()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_isize as isize;
@@ -92,7 +88,6 @@ fn from_1isize()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1u8()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_u8 as isize;
@@ -111,7 +106,6 @@ fn from_1u8()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1i8()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_i8 as isize;
@@ -130,7 +124,6 @@ fn from_1i8()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1u16()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_u16 as isize;
@@ -149,7 +142,6 @@ fn from_1u16()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1i16()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_i16 as isize;
@@ -168,7 +160,6 @@ fn from_1i16()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1u32()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_u32 as isize;
@@ -187,7 +178,6 @@ fn from_1u32()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1i32()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_i32 as isize;
@@ -206,7 +196,6 @@ fn from_1i32()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1u64()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_u64 as isize;
@@ -225,7 +214,6 @@ fn from_1u64()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_1i64()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, *const libc::FILE) {
     let c1 = 1_i64 as isize;
@@ -244,7 +232,6 @@ fn from_1i64()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13)
 }
 
-#[rustc_mir]
 fn from_bool()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64) {
     let c1 = true as isize;
@@ -260,7 +247,6 @@ fn from_bool()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10)
 }
 
-#[rustc_mir]
 fn from_1f32()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64) {
     let c1 = 1.0_f32 as isize;
@@ -278,7 +264,6 @@ fn from_1f32()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12)
 }
 
-#[rustc_mir]
 fn from_1f64()
 -> (isize, usize, i8, i16, i32, i64, u8, u16, u32, u64, f32, f64) {
     let c1 = 1.0f64 as isize;
@@ -296,7 +281,6 @@ fn from_1f64()
     (c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12)
 }
 
-#[rustc_mir]
 fn other_casts()
 -> (*const u8, *const isize, *const u8, *const u8) {
     let c1 = func as *const u8;
diff --git a/src/test/run-pass/mir_overflow_off.rs b/src/test/run-pass/mir_overflow_off.rs
index 04ac606a8a9..0db1e7b4563 100644
--- a/src/test/run-pass/mir_overflow_off.rs
+++ b/src/test/run-pass/mir_overflow_off.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags: -Z force-overflow-checks=off -Z orbit
+// compile-flags: -Z force-overflow-checks=off
 
 // Test that with MIR trans, overflow checks can be
 // turned off, even when they're from core::ops::*.
diff --git a/src/test/run-pass/mir_raw_fat_ptr.rs b/src/test/run-pass/mir_raw_fat_ptr.rs
index a632f00d9ee..c9fd88f2fb3 100644
--- a/src/test/run-pass/mir_raw_fat_ptr.rs
+++ b/src/test/run-pass/mir_raw_fat_ptr.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 // ignore-pretty : (#23623) problems when  ending with // comments
 
 // check raw fat pointer ops in mir
@@ -54,7 +52,6 @@ const GT: ComparisonResults = ComparisonResults {
     ne: true
 };
 
-#[rustc_mir]
 fn compare_su8(a: *const S<[u8]>, b: *const S<[u8]>) -> ComparisonResults {
     ComparisonResults {
         lt: a < b,
@@ -66,7 +63,6 @@ fn compare_su8(a: *const S<[u8]>, b: *const S<[u8]>) -> ComparisonResults {
     }
 }
 
-#[rustc_mir]
 fn compare_au8(a: *const [u8], b: *const [u8]) -> ComparisonResults {
     ComparisonResults {
         lt: a < b,
@@ -78,7 +74,6 @@ fn compare_au8(a: *const [u8], b: *const [u8]) -> ComparisonResults {
     }
 }
 
-#[rustc_mir]
 fn compare_foo<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> ComparisonResults {
     ComparisonResults {
         lt: a < b,
@@ -90,7 +85,6 @@ fn compare_foo<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> ComparisonResults
     }
 }
 
-#[rustc_mir]
 fn simple_eq<'a>(a: *const (Foo+'a), b: *const (Foo+'a)) -> bool {
     let result = a == b;
     result
diff --git a/src/test/run-pass/mir_refs_correct.rs b/src/test/run-pass/mir_refs_correct.rs
index 67baf2f9c49..df90fe2b791 100644
--- a/src/test/run-pass/mir_refs_correct.rs
+++ b/src/test/run-pass/mir_refs_correct.rs
@@ -7,9 +7,8 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
-// aux-build:mir_external_refs.rs
 
+// aux-build:mir_external_refs.rs
 
 extern crate mir_external_refs as ext;
 
@@ -78,128 +77,103 @@ fn parametric<T>(u: T) -> T {
     u
 }
 
-#[rustc_mir]
 fn t1() -> fn()->u8 {
     regular
 }
 
-#[rustc_mir]
 fn t2() -> fn(u8)->E {
     E::U
 }
 
-#[rustc_mir]
 fn t3() -> fn(u8)->S {
     S
 }
 
-#[rustc_mir]
 fn t4() -> fn()->u8 {
     S::hey
 }
 
-#[rustc_mir]
 fn t5() -> fn(&S)-> u8 {
     <S as X>::hoy
 }
 
 
-#[rustc_mir]
 fn t6() -> fn()->u8{
     ext::regular_fn
 }
 
-#[rustc_mir]
 fn t7() -> fn(u8)->ext::E {
     ext::E::U
 }
 
-#[rustc_mir]
 fn t8() -> fn(u8)->ext::S {
     ext::S
 }
 
-#[rustc_mir]
 fn t9() -> fn()->u8 {
     ext::S::hey
 }
 
-#[rustc_mir]
 fn t10() -> fn(&ext::S)->u8 {
     <ext::S as ext::X>::hoy
 }
 
-#[rustc_mir]
 fn t11() -> fn(u8)->u8 {
     parametric
 }
 
-#[rustc_mir]
 fn t12() -> u8 {
     C
 }
 
-#[rustc_mir]
 fn t13() -> [u8; 5] {
     C2
 }
 
-#[rustc_mir]
 fn t13_2() -> [u8; 3] {
     C3
 }
 
-#[rustc_mir]
 fn t14() -> fn()-> u8 {
     <S as X>::hoy2
 }
 
-#[rustc_mir]
 fn t15() -> fn(&S)-> u8 {
     S::hey2
 }
 
-#[rustc_mir]
 fn t16() -> fn(u32, u32)->u64 {
     F::f
 }
 
-#[rustc_mir]
 fn t17() -> fn(u32, u64)->u64 {
     F::f
 }
 
-#[rustc_mir]
 fn t18() -> fn(u64, u64)->u64 {
     F::f
 }
 
-#[rustc_mir]
 fn t19() -> fn(u64, u32)->u64 {
     F::f
 }
 
-#[rustc_mir]
 fn t20() -> fn(u64, u32)->(u64, u32) {
     <u32 as T<_, _>>::staticmeth
 }
 
-#[rustc_mir]
 fn t21() -> Unit {
     Unit
 }
 
-#[rustc_mir]
 fn t22() -> Option<u8> {
     None
 }
 
-#[rustc_mir]
 fn t23() -> (CEnum, CEnum) {
     (CEnum::A, CEnum::B)
 }
 
-#[rustc_mir]
 fn t24() -> fn(u8) -> S {
     C4
 }
diff --git a/src/test/run-pass/mir_small_agg_arg.rs b/src/test/run-pass/mir_small_agg_arg.rs
index 8a0cb046b7a..639a585ae00 100644
--- a/src/test/run-pass/mir_small_agg_arg.rs
+++ b/src/test/run-pass/mir_small_agg_arg.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn foo((x, y): (i8, i8)) {
 }
 
diff --git a/src/test/run-pass/mir_struct_with_assoc_ty.rs b/src/test/run-pass/mir_struct_with_assoc_ty.rs
index 1f75369b94a..7b2514c27c8 100644
--- a/src/test/run-pass/mir_struct_with_assoc_ty.rs
+++ b/src/test/run-pass/mir_struct_with_assoc_ty.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 use std::marker::PhantomData;
 
 pub trait DataBind {
@@ -26,7 +24,6 @@ pub struct Data {
     pub offsets: <Global<[u32; 2]> as DataBind>::Data,
 }
 
-#[rustc_mir]
 fn create_data() -> Data {
     let mut d = Data { offsets: [1, 2] };
     d.offsets[0] = 3;
diff --git a/src/test/run-pass/mir_temp_promotions.rs b/src/test/run-pass/mir_temp_promotions.rs
index de83c1f5ee0..4865e955091 100644
--- a/src/test/run-pass/mir_temp_promotions.rs
+++ b/src/test/run-pass/mir_temp_promotions.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn test1(f: f32) -> bool {
     // test that we properly promote temporaries to allocas when a temporary is assigned to
     // multiple times (assignment is still happening once ∀ possible dataflows).
diff --git a/src/test/run-pass/mir_trans_array.rs b/src/test/run-pass/mir_trans_array.rs
index e6ffb895825..b7f247012ce 100644
--- a/src/test/run-pass/mir_trans_array.rs
+++ b/src/test/run-pass/mir_trans_array.rs
@@ -7,9 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 
-#[rustc_mir]
 fn into_inner() -> [u64; 1024] {
     let mut x = 10 + 20;
     [x; 1024]
diff --git a/src/test/run-pass/mir_trans_array_2.rs b/src/test/run-pass/mir_trans_array_2.rs
index 4aa686298e9..c7133fb0c0e 100644
--- a/src/test/run-pass/mir_trans_array_2.rs
+++ b/src/test/run-pass/mir_trans_array_2.rs
@@ -7,9 +7,7 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 
-#[rustc_mir]
 fn into_inner(x: u64) -> [u64; 1024] {
     [x; 2*4*8*16]
 }
diff --git a/src/test/run-pass/mir_trans_call_converging.rs b/src/test/run-pass/mir_trans_call_converging.rs
index d8acfec25c4..7d420bb86c6 100644
--- a/src/test/run-pass/mir_trans_call_converging.rs
+++ b/src/test/run-pass/mir_trans_call_converging.rs
@@ -7,13 +7,11 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
-#![feature(rustc_attrs)]
 
 fn converging_fn() -> u64 {
     43
 }
 
-#[rustc_mir]
 fn mir() -> u64 {
     let x;
     loop {
diff --git a/src/test/run-pass/mir_trans_calls.rs b/src/test/run-pass/mir_trans_calls.rs
index 7ff684a5ef3..d429c681bbe 100644
--- a/src/test/run-pass/mir_trans_calls.rs
+++ b/src/test/run-pass/mir_trans_calls.rs
@@ -8,9 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs, fn_traits)]
+#![feature(fn_traits)]
 
-#[rustc_mir]
 fn test1(a: isize, b: (i32, i32), c: &[i32]) -> (isize, (i32, i32), &[i32]) {
     // Test passing a number of arguments including a fat pointer.
     // Also returning via an out pointer
@@ -20,7 +19,6 @@ fn test1(a: isize, b: (i32, i32), c: &[i32]) -> (isize, (i32, i32), &[i32]) {
     callee(a, b, c)
 }
 
-#[rustc_mir]
 fn test2(a: isize) -> isize {
     // Test passing a single argument.
     // Not using out pointer.
@@ -36,7 +34,6 @@ impl Foo {
     fn inherent_method(&self, a: isize) -> isize { a }
 }
 
-#[rustc_mir]
 fn test3(x: &Foo, a: isize) -> isize {
     // Test calling inherent method
     x.inherent_method(a)
@@ -47,19 +44,16 @@ trait Bar {
 }
 impl Bar for Foo {}
 
-#[rustc_mir]
 fn test4(x: &Foo, a: isize) -> isize {
     // Test calling extension method
     x.extension_method(a)
 }
 
-#[rustc_mir]
 fn test5(x: &Bar, a: isize) -> isize {
     // Test calling method on trait object
     x.extension_method(a)
 }
 
-#[rustc_mir]
 fn test6<T: Bar>(x: &T, a: isize) -> isize {
     // Test calling extension method on generic callee
     x.extension_method(a)
@@ -72,7 +66,6 @@ impl One for isize {
     fn one() -> isize { 1 }
 }
 
-#[rustc_mir]
 fn test7() -> isize {
     // Test calling trait static method
     <isize as One>::one()
@@ -83,7 +76,6 @@ impl Two {
     fn two() -> isize { 2 }
 }
 
-#[rustc_mir]
 fn test8() -> isize {
     // Test calling impl static method
     Two::two()
@@ -93,24 +85,20 @@ extern fn simple_extern(x: u32, y: (u32, u32)) -> u32 {
     x + y.0 * y.1
 }
 
-#[rustc_mir]
 fn test9() -> u32 {
     simple_extern(41, (42, 43))
 }
 
-#[rustc_mir]
 fn test_closure<F>(f: &F, x: i32, y: i32) -> i32
     where F: Fn(i32, i32) -> i32
 {
     f(x, y)
 }
 
-#[rustc_mir]
 fn test_fn_object(f: &Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     f(x, y)
 }
 
-#[rustc_mir]
 fn test_fn_impl(f: &&Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     // This call goes through the Fn implementation for &Fn provided in
     // core::ops::impls. It expands to a static Fn::call() that calls the
@@ -118,28 +106,24 @@ fn test_fn_impl(f: &&Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     f(x, y)
 }
 
-#[rustc_mir]
 fn test_fn_direct_call<F>(f: &F, x: i32, y: i32) -> i32
     where F: Fn(i32, i32) -> i32
 {
     f.call((x, y))
 }
 
-#[rustc_mir]
 fn test_fn_const_call<F>(f: &F) -> i32
     where F: Fn(i32, i32) -> i32
 {
     f.call((100, -1))
 }
 
-#[rustc_mir]
 fn test_fn_nil_call<F>(f: &F) -> i32
     where F: Fn() -> i32
 {
     f()
 }
 
-#[rustc_mir]
 fn test_fn_transmute_zst(x: ()) -> [(); 1] {
     fn id<T>(x: T) -> T {x}
 
@@ -148,30 +132,24 @@ fn test_fn_transmute_zst(x: ()) -> [(); 1] {
     })
 }
 
-#[rustc_mir]
 fn test_fn_ignored_pair() -> ((), ()) {
     ((), ())
 }
 
-#[rustc_mir]
 fn test_fn_ignored_pair_0() {
     test_fn_ignored_pair().0
 }
 
-#[rustc_mir]
 fn id<T>(x: T) -> T { x }
 
-#[rustc_mir]
 fn ignored_pair_named() -> (Foo, Foo) {
     (Foo, Foo)
 }
 
-#[rustc_mir]
 fn test_fn_ignored_pair_named() -> (Foo, Foo) {
     id(ignored_pair_named())
 }
 
-#[rustc_mir]
 fn test_fn_nested_pair(x: &((f32, f32), u32)) -> (f32, f32) {
     let y = *x;
     let z = y.0;
diff --git a/src/test/run-pass/mir_trans_calls_variadic.rs b/src/test/run-pass/mir_trans_calls_variadic.rs
index 7f711b2758d..4e06738da4f 100644
--- a/src/test/run-pass/mir_trans_calls_variadic.rs
+++ b/src/test/run-pass/mir_trans_calls_variadic.rs
@@ -8,14 +8,11 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 #[link(name = "rust_test_helpers")]
 extern {
     fn rust_interesting_average(_: i64, ...) -> f64;
 }
 
-#[rustc_mir]
 fn test<T, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
     unsafe {
         rust_interesting_average(6, a, a as f64,
diff --git a/src/test/run-pass/mir_trans_critical_edge.rs b/src/test/run-pass/mir_trans_critical_edge.rs
index 320f4017592..f6fe19c4309 100644
--- a/src/test/run-pass/mir_trans_critical_edge.rs
+++ b/src/test/run-pass/mir_trans_critical_edge.rs
@@ -29,7 +29,6 @@ impl<A, B> Foo<A, B>
 where A: Iterator, B: Iterator<Item=A::Item>
 {
     // This is the function we care about
-    #[rustc_mir]
     fn next(&mut self) -> Option<A::Item> {
         match self.state {
             State::Both => match self.a.next() {
diff --git a/src/test/run-pass/mir_trans_spike1.rs b/src/test/run-pass/mir_trans_spike1.rs
index 9a06ab78e73..8474e841e01 100644
--- a/src/test/run-pass/mir_trans_spike1.rs
+++ b/src/test/run-pass/mir_trans_spike1.rs
@@ -10,9 +10,6 @@
 
 // A simple spike test for MIR version of trans.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn sum(x: i32, y: i32) -> i32 {
     x + y
 }
diff --git a/src/test/run-pass/mir_trans_switch.rs b/src/test/run-pass/mir_trans_switch.rs
index c32d9da724d..b097bf46ad3 100644
--- a/src/test/run-pass/mir_trans_switch.rs
+++ b/src/test/run-pass/mir_trans_switch.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 enum Abc {
     A(u8),
     B(i8),
@@ -17,7 +15,6 @@ enum Abc {
     D,
 }
 
-#[rustc_mir]
 fn foo(x: Abc) -> i32 {
     match x {
         Abc::C => 3,
@@ -27,7 +24,6 @@ fn foo(x: Abc) -> i32 {
     }
 }
 
-#[rustc_mir]
 fn foo2(x: Abc) -> bool {
     match x {
         Abc::D => true,
diff --git a/src/test/run-pass/mir_trans_switchint.rs b/src/test/run-pass/mir_trans_switchint.rs
index edde5f3c895..537734596a5 100644
--- a/src/test/run-pass/mir_trans_switchint.rs
+++ b/src/test/run-pass/mir_trans_switchint.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 pub fn foo(x: i8) -> i32 {
   match x {
     1 => 0,
diff --git a/src/test/run-pass/mir_void_return.rs b/src/test/run-pass/mir_void_return.rs
index 8b07449b8fa..78cb9fb39d6 100644
--- a/src/test/run-pass/mir_void_return.rs
+++ b/src/test/run-pass/mir_void_return.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
-#[rustc_mir]
 fn mir() -> (){
     let x = 1;
     let mut y = 0;
diff --git a/src/test/run-pass/mir_void_return_2.rs b/src/test/run-pass/mir_void_return_2.rs
index a3ad3432409..fc9e3d5e3b5 100644
--- a/src/test/run-pass/mir_void_return_2.rs
+++ b/src/test/run-pass/mir_void_return_2.rs
@@ -8,11 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
-
 fn nil() {}
 
-#[rustc_mir]
 fn mir(){
     nil()
 }
diff --git a/src/test/run-pass/vec-matching-fold.rs b/src/test/run-pass/vec-matching-fold.rs
index 7a6129d311e..ac80a4211ad 100644
--- a/src/test/run-pass/vec-matching-fold.rs
+++ b/src/test/run-pass/vec-matching-fold.rs
@@ -11,11 +11,9 @@
 
 #![feature(advanced_slice_patterns)]
 #![feature(slice_patterns)]
-#![feature(rustc_attrs)]
 
 use std::fmt::Debug;
 
-#[rustc_mir(graphviz="mir.gv")]
 fn foldl<T, U, F>(values: &[T],
                   initial: U,
                   mut function: F)
@@ -32,7 +30,6 @@ fn foldl<T, U, F>(values: &[T],
     }
 }
 
-#[rustc_mir]
 fn foldr<T, U, F>(values: &[T],
                   initial: U,
                   mut function: F)
diff --git a/src/test/run-pass/vec-matching-legal-tail-element-borrow.rs b/src/test/run-pass/vec-matching-legal-tail-element-borrow.rs
index 1093bc7c18b..eecc3e7afdb 100644
--- a/src/test/run-pass/vec-matching-legal-tail-element-borrow.rs
+++ b/src/test/run-pass/vec-matching-legal-tail-element-borrow.rs
@@ -8,9 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(slice_patterns, rustc_attrs)]
+#![feature(slice_patterns)]
 
-#[rustc_mir]
 pub fn main() {
     let x = &[1, 2, 3, 4, 5];
     let x: &[isize] = &[1, 2, 3, 4, 5];
diff --git a/src/test/run-pass/vec-matching.rs b/src/test/run-pass/vec-matching.rs
index 075709a63b5..97006f54cd9 100644
--- a/src/test/run-pass/vec-matching.rs
+++ b/src/test/run-pass/vec-matching.rs
@@ -11,9 +11,7 @@
 
 #![feature(advanced_slice_patterns)]
 #![feature(slice_patterns)]
-#![feature(rustc_attrs)]
 
-#[rustc_mir]
 fn a() {
     let x = [1];
     match x {
@@ -23,7 +21,6 @@ fn a() {
     }
 }
 
-#[rustc_mir]
 fn b() {
     let x = [1, 2, 3];
     match x {
@@ -60,7 +57,6 @@ fn b() {
 }
 
 
-#[rustc_mir]
 fn b_slice() {
     let x : &[_] = &[1, 2, 3];
     match x {
@@ -100,7 +96,6 @@ fn b_slice() {
     }
 }
 
-#[rustc_mir]
 fn c() {
     let x = [1];
     match x {
@@ -109,7 +104,6 @@ fn c() {
     }
 }
 
-#[rustc_mir]
 fn d() {
     let x = [1, 2, 3];
     let branch = match x {
@@ -121,7 +115,6 @@ fn d() {
     assert_eq!(branch, 1);
 }
 
-#[rustc_mir]
 fn e() {
     let x: &[isize] = &[1, 2, 3];
     let a = match *x {
diff --git a/src/test/run-pass/vec-tail-matching.rs b/src/test/run-pass/vec-tail-matching.rs
index 6084a0d07a1..d123eb36a7d 100644
--- a/src/test/run-pass/vec-tail-matching.rs
+++ b/src/test/run-pass/vec-tail-matching.rs
@@ -11,13 +11,11 @@
 
 
 #![feature(slice_patterns)]
-#![feature(rustc_attrs)]
 
 struct Foo {
     string: &'static str
 }
 
-#[rustc_mir]
 pub fn main() {
     let x = [
         Foo { string: "foo" },
diff --git a/src/test/run-pass/zero-size-type-destructors.rs b/src/test/run-pass/zero-size-type-destructors.rs
index a663ae650c0..e36ae6b11b3 100644
--- a/src/test/run-pass/zero-size-type-destructors.rs
+++ b/src/test/run-pass/zero-size-type-destructors.rs
@@ -8,13 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs, unsafe_no_drop_flag)]
+#![feature(unsafe_no_drop_flag)]
 
 // ignore-pretty : (#23623) problems when  ending with // comments
 
 static mut destructions : isize = 3;
 
-#[rustc_no_mir] // FIXME #29855 MIR doesn't handle all drops correctly.
 pub fn foo() {
     #[unsafe_no_drop_flag]
     struct Foo;
diff --git a/src/test/run-pass/zero_sized_subslice_match.rs b/src/test/run-pass/zero_sized_subslice_match.rs
index 00f4aa98a3e..d399ef72976 100644
--- a/src/test/run-pass/zero_sized_subslice_match.rs
+++ b/src/test/run-pass/zero_sized_subslice_match.rs
@@ -8,10 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(rustc_attrs)]
 #![feature(slice_patterns)]
 
-#[rustc_mir]
 fn main() {
     let x = [(), ()];