about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/liballoc/arc.rs6
-rw-r--r--src/liballoc/lib.rs19
-rw-r--r--src/liballoc/rc.rs6
-rw-r--r--src/liballoc_jemalloc/lib.rs6
-rw-r--r--src/liballoc_system/lib.rs6
-rw-r--r--src/libarena/lib.rs8
-rw-r--r--src/libcollections/lib.rs20
-rw-r--r--src/libcore/intrinsics.rs132
-rw-r--r--src/libcore/lib.rs8
-rw-r--r--src/libcore/nonzero.rs30
-rw-r--r--src/libcore/num/bignum.rs9
-rw-r--r--src/libcore/num/mod.rs161
-rw-r--r--src/libcore/num/wrapping.rs181
-rw-r--r--src/libcore/ops.rs73
-rw-r--r--src/libcore/ptr.rs26
-rw-r--r--src/libflate/lib.rs4
-rw-r--r--src/libfmt_macros/lib.rs3
-rw-r--r--src/libgetopts/lib.rs4
-rw-r--r--src/libgraphviz/lib.rs3
-rw-r--r--src/liblog/lib.rs3
-rw-r--r--src/librand/lib.rs4
-rw-r--r--src/librbml/lib.rs3
-rw-r--r--src/librustc/lib.rs3
-rw-r--r--src/librustc/middle/expr_use_visitor.rs2
-rw-r--r--src/librustc/util/common.rs1
-rw-r--r--src/librustc_back/lib.rs3
-rw-r--r--src/librustc_bitflags/lib.rs4
-rw-r--r--src/librustc_borrowck/lib.rs3
-rw-r--r--src/librustc_data_structures/lib.rs3
-rw-r--r--src/librustc_driver/lib.rs30
-rw-r--r--src/librustc_front/lib.rs3
-rw-r--r--src/librustc_lint/lib.rs3
-rw-r--r--src/librustc_llvm/lib.rs5
-rw-r--r--src/librustc_metadata/lib.rs2
-rw-r--r--src/librustc_platform_intrinsics/lib.rs2
-rw-r--r--src/librustc_plugin/lib.rs2
-rw-r--r--src/librustc_privacy/lib.rs3
-rw-r--r--src/librustc_resolve/lib.rs3
-rw-r--r--src/librustc_trans/lib.rs3
-rw-r--r--src/librustc_typeck/lib.rs4
-rw-r--r--src/librustc_unicode/lib.rs6
-rw-r--r--src/librustdoc/core.rs4
-rw-r--r--src/librustdoc/lib.rs9
-rw-r--r--src/librustdoc/test.rs6
-rw-r--r--src/libserialize/lib.rs3
-rw-r--r--src/libstd/lib.rs9
-rw-r--r--src/libstd/rand/os.rs2
-rw-r--r--src/libstd/sys/common/libunwind.rs2
-rw-r--r--src/libstd/sys/common/unwind/mod.rs12
-rw-r--r--src/libstd/sys/windows/c.rs2
-rw-r--r--src/libsyntax/lib.rs5
-rw-r--r--src/libsyntax_ext/lib.rs2
-rw-r--r--src/libterm/lib.rs3
-rw-r--r--src/libtest/lib.rs3
-rw-r--r--src/rtstartup/rsbegin.rs2
-rw-r--r--src/rtstartup/rsend.rs2
-rw-r--r--src/snapshots.txt8
-rw-r--r--src/test/run-make/execution-engine/test.rs3
-rw-r--r--src/test/run-make/issue-19371/foo.rs3
59 files changed, 44 insertions, 836 deletions
diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs
index 9479d47943e..755e44899fc 100644
--- a/src/liballoc/arc.rs
+++ b/src/liballoc/arc.rs
@@ -80,10 +80,8 @@ use core::mem::{align_of_val, size_of_val};
 use core::intrinsics::abort;
 use core::mem;
 use core::ops::Deref;
-#[cfg(not(stage0))]
 use core::ops::CoerceUnsized;
 use core::ptr::{self, Shared};
-#[cfg(not(stage0))]
 use core::marker::Unsize;
 use core::hash::{Hash, Hasher};
 use core::{usize, isize};
@@ -135,8 +133,6 @@ unsafe impl<T: ?Sized + Sync + Send> Send for Arc<T> {}
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
 
-// remove cfg after new snapshot
-#[cfg(not(stage0))]
 #[unstable(feature = "coerce_unsized", issue = "27732")]
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
 
@@ -157,8 +153,6 @@ unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> {}
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
 
-// remove cfg after new snapshot
-#[cfg(not(stage0))]
 #[unstable(feature = "coerce_unsized", issue = "27732")]
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
 
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index f665b1e1924..93b84cdedd4 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -56,11 +56,8 @@
 //! The [`heap`](heap/index.html) module defines the low-level interface to the
 //! default global allocator. It is not compatible with the libc allocator API.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc"]
 #![crate_type = "rlib"]
-#![cfg_attr(stage0, staged_api)]
 #![allow(unused_attributes)]
 #![unstable(feature = "alloc",
             reason = "this library is unlikely to be stabilized in its current \
@@ -72,11 +69,8 @@
        issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
        test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
 #![no_std]
-#![cfg_attr(not(stage0), needs_allocator)]
+#![needs_allocator]
 
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, feature(no_std))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(allocator)]
 #![feature(box_syntax)]
 #![feature(coerce_unsized)]
@@ -84,7 +78,6 @@
 #![feature(custom_attribute)]
 #![feature(fundamental)]
 #![feature(lang_items)]
-#![feature(nonzero)]
 #![feature(num_bits_bytes)]
 #![feature(optin_builtin_traits)]
 #![feature(placement_in_syntax)]
@@ -95,23 +88,15 @@
 #![feature(unboxed_closures)]
 #![feature(unique)]
 #![feature(unsafe_no_drop_flag, filling_drop)]
-// SNAP 1af31d4
-#![allow(unused_features)]
-// SNAP 1af31d4
-#![allow(unused_attributes)]
 #![feature(dropck_parametricity)]
 #![feature(unsize)]
 #![feature(drop_in_place)]
 #![feature(fn_traits)]
 
-#![cfg_attr(stage0, feature(alloc_system))]
-#![cfg_attr(not(stage0), feature(needs_allocator))]
+#![feature(needs_allocator)]
 
 #![cfg_attr(test, feature(test, rustc_private, box_heap))]
 
-#[cfg(stage0)]
-extern crate alloc_system;
-
 // Allow testing this library
 
 #[cfg(test)]
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index 8f00605d33b..52f035b67bd 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -162,11 +162,9 @@ use core::fmt;
 use core::hash::{Hasher, Hash};
 use core::intrinsics::{assume, abort};
 use core::marker;
-#[cfg(not(stage0))]
 use core::marker::Unsize;
 use core::mem::{self, align_of_val, size_of_val, forget};
 use core::ops::Deref;
-#[cfg(not(stage0))]
 use core::ops::CoerceUnsized;
 use core::ptr::{self, Shared};
 use core::convert::From;
@@ -196,8 +194,6 @@ impl<T: ?Sized> !marker::Send for Rc<T> {}
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !marker::Sync for Rc<T> {}
 
-// remove cfg after new snapshot
-#[cfg(not(stage0))]
 #[unstable(feature = "coerce_unsized", issue = "27732")]
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
 
@@ -723,8 +719,6 @@ impl<T: ?Sized> !marker::Send for Weak<T> {}
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T: ?Sized> !marker::Sync for Weak<T> {}
 
-// remove cfg after new snapshot
-#[cfg(not(stage0))]
 #[unstable(feature = "coerce_unsized", issue = "27732")]
 impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
 
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs
index ec6c6ae31c1..413eac3cf79 100644
--- a/src/liballoc_jemalloc/lib.rs
+++ b/src/liballoc_jemalloc/lib.rs
@@ -8,13 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc_jemalloc"]
 #![crate_type = "rlib"]
-#![cfg_attr(stage0, staged_api)]
 #![no_std]
-#![cfg_attr(not(stage0), allocator)]
-#![cfg_attr(stage0, allow(improper_ctypes))]
+#![allocator]
 #![unstable(feature = "alloc_jemalloc",
             reason = "this library is unlikely to be stabilized in its current \
                       form or name",
@@ -22,7 +19,6 @@
 #![feature(allocator)]
 #![feature(libc)]
 #![feature(staged_api)]
-#![cfg_attr(stage0, feature(no_std))]
 
 extern crate libc;
 
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index a6e89d5d00c..fccc024603e 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -8,13 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "alloc_system"]
 #![crate_type = "rlib"]
-#![cfg_attr(stage0, staged_api)]
 #![no_std]
-#![cfg_attr(not(stage0), allocator)]
-#![cfg_attr(stage0, allow(improper_ctypes))]
+#![allocator]
 #![unstable(feature = "alloc_system",
             reason = "this library is unlikely to be stabilized in its current \
                       form or name",
@@ -22,7 +19,6 @@
 #![feature(allocator)]
 #![feature(libc)]
 #![feature(staged_api)]
-#![cfg_attr(stage0, feature(no_std))]
 
 extern crate libc;
 
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 7871135e9c2..b5107e411e8 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -19,11 +19,8 @@
 //! arena but can only hold objects of a single type, and `Arena`, which is a
 //! more complex, slower arena which can hold objects of any type.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "arena"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -42,11 +39,6 @@
 #![feature(dropck_parametricity)]
 #![cfg_attr(test, feature(test))]
 
-// SNAP 1af31d4
-#![allow(unused_features)]
-// SNAP 1af31d4
-#![allow(unused_attributes)]
-
 extern crate alloc;
 
 use std::cell::{Cell, RefCell};
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs
index a7797d4b0d0..000ec4f0f66 100644
--- a/src/libcollections/lib.rs
+++ b/src/libcollections/lib.rs
@@ -13,10 +13,7 @@
 //! See [std::collections](../std/collections) for a detailed discussion of
 //! collections in Rust.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "collections"]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![unstable(feature = "collections",
             reason = "library is unlikely to be stabilized with the current \
@@ -32,17 +29,14 @@
 #![allow(trivial_casts)]
 #![cfg_attr(test, allow(deprecated))] // rand
 
-// SNAP 1af31d4
-#![allow(unused_features)]
-// SNAP 1af31d4
-#![allow(unused_attributes)]
-
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(alloc)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
+#![feature(clone_from_slice)]
 #![feature(core_intrinsics)]
+#![feature(decode_utf16)]
+#![feature(drop_in_place)]
+#![feature(dropck_parametricity)]
 #![feature(fmt_internals)]
 #![feature(fmt_radix)]
 #![feature(heap_api)]
@@ -53,7 +47,6 @@
 #![feature(oom)]
 #![feature(pattern)]
 #![feature(ptr_as_ref)]
-#![feature(ref_slice)]
 #![feature(slice_bytes)]
 #![feature(slice_patterns)]
 #![feature(staged_api)]
@@ -62,14 +55,9 @@
 #![feature(unboxed_closures)]
 #![feature(unicode)]
 #![feature(unique)]
-#![feature(dropck_parametricity)]
 #![feature(unsafe_no_drop_flag, filling_drop)]
-#![feature(decode_utf16)]
-#![feature(drop_in_place)]
-#![feature(clone_from_slice)]
 #![cfg_attr(test, feature(clone_from_slice, rand, test))]
 
-#![cfg_attr(stage0, feature(no_std))]
 #![no_std]
 
 extern crate rustc_unicode;
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index a094bcd0192..568c4e143e0 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -512,164 +512,32 @@ extern "rust-intrinsic" {
     /// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
     pub fn roundf64(x: f64) -> f64;
 
-    /// Returns the number of bits set in a `u8`.
-    #[cfg(stage0)]
-    pub fn ctpop8(x: u8) -> u8;
-    /// Returns the number of bits set in a `u16`.
-    #[cfg(stage0)]
-    pub fn ctpop16(x: u16) -> u16;
-    /// Returns the number of bits set in a `u32`.
-    #[cfg(stage0)]
-    pub fn ctpop32(x: u32) -> u32;
-    /// Returns the number of bits set in a `u64`.
-    #[cfg(stage0)]
-    pub fn ctpop64(x: u64) -> u64;
     /// Returns the number of bits set in an integer type `T`
-    #[cfg(not(stage0))]
     pub fn ctpop<T>(x: T) -> T;
 
-    /// Returns the number of leading bits unset in a `u8`.
-    #[cfg(stage0)]
-    pub fn ctlz8(x: u8) -> u8;
-    /// Returns the number of leading bits unset in a `u16`.
-    #[cfg(stage0)]
-    pub fn ctlz16(x: u16) -> u16;
-    /// Returns the number of leading bits unset in a `u32`.
-    #[cfg(stage0)]
-    pub fn ctlz32(x: u32) -> u32;
-    /// Returns the number of leading bits unset in a `u64`.
-    #[cfg(stage0)]
-    pub fn ctlz64(x: u64) -> u64;
     /// Returns the number of leading bits unset in an integer type `T`
-    #[cfg(not(stage0))]
     pub fn ctlz<T>(x: T) -> T;
 
-    /// Returns the number of trailing bits unset in a `u8`.
-    #[cfg(stage0)]
-    pub fn cttz8(x: u8) -> u8;
-    /// Returns the number of trailing bits unset in a `u16`.
-    #[cfg(stage0)]
-    pub fn cttz16(x: u16) -> u16;
-    /// Returns the number of trailing bits unset in a `u32`.
-    #[cfg(stage0)]
-    pub fn cttz32(x: u32) -> u32;
-    /// Returns the number of trailing bits unset in a `u64`.
-    #[cfg(stage0)]
-    pub fn cttz64(x: u64) -> u64;
     /// Returns the number of trailing bits unset in an integer type `T`
-    #[cfg(not(stage0))]
     pub fn cttz<T>(x: T) -> T;
 
-    /// Reverses the bytes in a `u16`.
-    #[cfg(stage0)]
-    pub fn bswap16(x: u16) -> u16;
-    /// Reverses the bytes in a `u32`.
-    #[cfg(stage0)]
-    pub fn bswap32(x: u32) -> u32;
-    /// Reverses the bytes in a `u64`.
-    #[cfg(stage0)]
-    pub fn bswap64(x: u64) -> u64;
     /// Reverses the bytes in an integer type `T`.
-    #[cfg(not(stage0))]
     pub fn bswap<T>(x: T) -> T;
 
-    /// Performs checked `i8` addition.
-    #[cfg(stage0)]
-    pub fn i8_add_with_overflow(x: i8, y: i8) -> (i8, bool);
-    /// Performs checked `i16` addition.
-    #[cfg(stage0)]
-    pub fn i16_add_with_overflow(x: i16, y: i16) -> (i16, bool);
-    /// Performs checked `i32` addition.
-    #[cfg(stage0)]
-    pub fn i32_add_with_overflow(x: i32, y: i32) -> (i32, bool);
-    /// Performs checked `i64` addition.
-    #[cfg(stage0)]
-    pub fn i64_add_with_overflow(x: i64, y: i64) -> (i64, bool);
-
-    /// Performs checked `u8` addition.
-    #[cfg(stage0)]
-    pub fn u8_add_with_overflow(x: u8, y: u8) -> (u8, bool);
-    /// Performs checked `u16` addition.
-    #[cfg(stage0)]
-    pub fn u16_add_with_overflow(x: u16, y: u16) -> (u16, bool);
-    /// Performs checked `u32` addition.
-    #[cfg(stage0)]
-    pub fn u32_add_with_overflow(x: u32, y: u32) -> (u32, bool);
-    /// Performs checked `u64` addition.
-    #[cfg(stage0)]
-    pub fn u64_add_with_overflow(x: u64, y: u64) -> (u64, bool);
-
     /// Performs checked integer addition.
-    #[cfg(not(stage0))]
     pub fn add_with_overflow<T>(x: T, y: T) -> (T, bool);
 
-    /// Performs checked `i8` subtraction.
-    #[cfg(stage0)]
-    pub fn i8_sub_with_overflow(x: i8, y: i8) -> (i8, bool);
-    /// Performs checked `i16` subtraction.
-    #[cfg(stage0)]
-    pub fn i16_sub_with_overflow(x: i16, y: i16) -> (i16, bool);
-    /// Performs checked `i32` subtraction.
-    #[cfg(stage0)]
-    pub fn i32_sub_with_overflow(x: i32, y: i32) -> (i32, bool);
-    /// Performs checked `i64` subtraction.
-    #[cfg(stage0)]
-    pub fn i64_sub_with_overflow(x: i64, y: i64) -> (i64, bool);
-
-    /// Performs checked `u8` subtraction.
-    #[cfg(stage0)]
-    pub fn u8_sub_with_overflow(x: u8, y: u8) -> (u8, bool);
-    /// Performs checked `u16` subtraction.
-    #[cfg(stage0)]
-    pub fn u16_sub_with_overflow(x: u16, y: u16) -> (u16, bool);
-    /// Performs checked `u32` subtraction.
-    #[cfg(stage0)]
-    pub fn u32_sub_with_overflow(x: u32, y: u32) -> (u32, bool);
-    /// Performs checked `u64` subtraction.
-    #[cfg(stage0)]
-    pub fn u64_sub_with_overflow(x: u64, y: u64) -> (u64, bool);
-
     /// Performs checked integer subtraction
-    #[cfg(not(stage0))]
     pub fn sub_with_overflow<T>(x: T, y: T) -> (T, bool);
 
-    /// Performs checked `i8` multiplication.
-    #[cfg(stage0)]
-    pub fn i8_mul_with_overflow(x: i8, y: i8) -> (i8, bool);
-    /// Performs checked `i16` multiplication.
-    #[cfg(stage0)]
-    pub fn i16_mul_with_overflow(x: i16, y: i16) -> (i16, bool);
-    /// Performs checked `i32` multiplication.
-    #[cfg(stage0)]
-    pub fn i32_mul_with_overflow(x: i32, y: i32) -> (i32, bool);
-    /// Performs checked `i64` multiplication.
-    #[cfg(stage0)]
-    pub fn i64_mul_with_overflow(x: i64, y: i64) -> (i64, bool);
-
-    /// Performs checked `u8` multiplication.
-    #[cfg(stage0)]
-    pub fn u8_mul_with_overflow(x: u8, y: u8) -> (u8, bool);
-    /// Performs checked `u16` multiplication.
-    #[cfg(stage0)]
-    pub fn u16_mul_with_overflow(x: u16, y: u16) -> (u16, bool);
-    /// Performs checked `u32` multiplication.
-    #[cfg(stage0)]
-    pub fn u32_mul_with_overflow(x: u32, y: u32) -> (u32, bool);
-    /// Performs checked `u64` multiplication.
-    #[cfg(stage0)]
-    pub fn u64_mul_with_overflow(x: u64, y: u64) -> (u64, bool);
-
     /// Performs checked integer multiplication
-    #[cfg(not(stage0))]
     pub fn mul_with_overflow<T>(x: T, y: T) -> (T, bool);
 
     /// Performs an unchecked division, resulting in undefined behavior
     /// where y = 0 or x = `T::min_value()` and y = -1
-    #[cfg(not(stage0))]
     pub fn unchecked_div<T>(x: T, y: T) -> T;
     /// Returns the remainder of an unchecked division, resulting in
     /// undefined behavior where y = 0 or x = `T::min_value()` and y = -1
-    #[cfg(not(stage0))]
     pub fn unchecked_rem<T>(x: T, y: T) -> T;
 
     /// Returns (a + b) mod 2^N, where N is the width of T in bits.
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index cde86230d75..e8803976937 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -43,11 +43,8 @@
 // Since libcore defines many fundamental lang items, all tests live in a
 // separate crate, libcoretest, to avoid bizarre issues.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "core"]
 #![stable(feature = "core", since = "1.6.0")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
@@ -60,8 +57,6 @@
 #![no_core]
 #![deny(missing_docs)]
 
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(allow_internal_unstable)]
 #![feature(associated_type_defaults)]
 #![feature(concat_idents)]
@@ -75,8 +70,7 @@
 #![feature(optin_builtin_traits)]
 #![feature(reflect)]
 #![feature(unwind_attributes)]
-#![cfg_attr(stage0, feature(simd))]
-#![cfg_attr(not(stage0), feature(repr_simd, platform_intrinsics))]
+#![feature(repr_simd, platform_intrinsics)]
 #![feature(staged_api)]
 #![feature(unboxed_closures)]
 
diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs
index c4ca3fa384e..92bbc4efb7c 100644
--- a/src/libcore/nonzero.rs
+++ b/src/libcore/nonzero.rs
@@ -38,31 +38,13 @@ unsafe impl Zeroable for u64 {}
 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
 pub struct NonZero<T: Zeroable>(T);
 
-#[cfg(stage0)]
-macro_rules! nonzero_new {
-    () => (
-        /// Creates an instance of NonZero with the provided value.
-        /// You must indeed ensure that the value is actually "non-zero".
-        #[inline(always)]
-        pub unsafe fn new(inner: T) -> NonZero<T> {
-            NonZero(inner)
-        }
-    )
-}
-#[cfg(not(stage0))]
-macro_rules! nonzero_new {
-    () => (
-        /// Creates an instance of NonZero with the provided value.
-        /// You must indeed ensure that the value is actually "non-zero".
-        #[inline(always)]
-        pub const unsafe fn new(inner: T) -> NonZero<T> {
-            NonZero(inner)
-        }
-    )
-}
-
 impl<T: Zeroable> NonZero<T> {
-    nonzero_new!{}
+    /// Creates an instance of NonZero with the provided value.
+    /// You must indeed ensure that the value is actually "non-zero".
+    #[inline(always)]
+    pub const unsafe fn new(inner: T) -> NonZero<T> {
+        NonZero(inner)
+    }
 }
 
 impl<T: Zeroable> Deref for NonZero<T> {
diff --git a/src/libcore/num/bignum.rs b/src/libcore/num/bignum.rs
index 5d15ada4e75..66c6deb3615 100644
--- a/src/libcore/num/bignum.rs
+++ b/src/libcore/num/bignum.rs
@@ -55,15 +55,6 @@ macro_rules! impl_full_ops {
     ($($ty:ty: add($addfn:path), mul/div($bigty:ident);)*) => (
         $(
             impl FullOps for $ty {
-                #[cfg(stage0)]
-                fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) {
-                    // this cannot overflow, the output is between 0 and 2*2^nbits - 1
-                    // FIXME will LLVM optimize this into ADC or similar???
-                    let (v, carry1) = unsafe { $addfn(self, other) };
-                    let (v, carry2) = unsafe { $addfn(v, if carry {1} else {0}) };
-                    (carry1 || carry2, v)
-                }
-                #[cfg(not(stage0))]
                 fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) {
                     // this cannot overflow, the output is between 0 and 2*2^nbits - 1
                     // FIXME will LLVM optimize this into ADC or similar???
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 8abb12706a5..f180a513b86 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -115,11 +115,6 @@ macro_rules! zero_one_impl_float {
 }
 zero_one_impl_float! { f32 f64 }
 
-// Just for stage0; a byte swap on a byte is a no-op
-// Delete this once it becomes unused
-#[cfg(stage0)]
-unsafe fn bswap8(x: u8) -> u8 { x }
-
 macro_rules! checked_op {
     ($U:ty, $op:path, $x:expr, $y:expr) => {{
         let (result, overflowed) = unsafe { $op($x as $U, $y as $U) };
@@ -785,15 +780,6 @@ macro_rules! int_impl {
 }
 
 #[lang = "i8"]
-#[cfg(stage0)]
-impl i8 {
-    int_impl! { i8, u8, 8,
-        intrinsics::i8_add_with_overflow,
-        intrinsics::i8_sub_with_overflow,
-        intrinsics::i8_mul_with_overflow }
-}
-#[lang = "i8"]
-#[cfg(not(stage0))]
 impl i8 {
     int_impl! { i8, u8, 8,
         intrinsics::add_with_overflow,
@@ -802,15 +788,6 @@ impl i8 {
 }
 
 #[lang = "i16"]
-#[cfg(stage0)]
-impl i16 {
-    int_impl! { i16, u16, 16,
-        intrinsics::i16_add_with_overflow,
-        intrinsics::i16_sub_with_overflow,
-        intrinsics::i16_mul_with_overflow }
-}
-#[lang = "i16"]
-#[cfg(not(stage0))]
 impl i16 {
     int_impl! { i16, u16, 16,
         intrinsics::add_with_overflow,
@@ -819,15 +796,6 @@ impl i16 {
 }
 
 #[lang = "i32"]
-#[cfg(stage0)]
-impl i32 {
-    int_impl! { i32, u32, 32,
-        intrinsics::i32_add_with_overflow,
-        intrinsics::i32_sub_with_overflow,
-        intrinsics::i32_mul_with_overflow }
-}
-#[lang = "i32"]
-#[cfg(not(stage0))]
 impl i32 {
     int_impl! { i32, u32, 32,
         intrinsics::add_with_overflow,
@@ -836,15 +804,6 @@ impl i32 {
 }
 
 #[lang = "i64"]
-#[cfg(stage0)]
-impl i64 {
-    int_impl! { i64, u64, 64,
-        intrinsics::i64_add_with_overflow,
-        intrinsics::i64_sub_with_overflow,
-        intrinsics::i64_mul_with_overflow }
-}
-#[lang = "i64"]
-#[cfg(not(stage0))]
 impl i64 {
     int_impl! { i64, u64, 64,
         intrinsics::add_with_overflow,
@@ -854,16 +813,6 @@ impl i64 {
 
 #[cfg(target_pointer_width = "32")]
 #[lang = "isize"]
-#[cfg(stage0)]
-impl isize {
-    int_impl! { i32, u32, 32,
-        intrinsics::i32_add_with_overflow,
-        intrinsics::i32_sub_with_overflow,
-        intrinsics::i32_mul_with_overflow }
-}
-#[cfg(target_pointer_width = "32")]
-#[lang = "isize"]
-#[cfg(not(stage0))]
 impl isize {
     int_impl! { i32, u32, 32,
         intrinsics::add_with_overflow,
@@ -873,16 +822,6 @@ impl isize {
 
 #[cfg(target_pointer_width = "64")]
 #[lang = "isize"]
-#[cfg(stage0)]
-impl isize {
-    int_impl! { i64, u64, 64,
-        intrinsics::i64_add_with_overflow,
-        intrinsics::i64_sub_with_overflow,
-        intrinsics::i64_mul_with_overflow }
-}
-#[cfg(target_pointer_width = "64")]
-#[lang = "isize"]
-#[cfg(not(stage0))]
 impl isize {
     int_impl! { i64, u64, 64,
         intrinsics::add_with_overflow,
@@ -980,25 +919,6 @@ macro_rules! uint_impl {
             unsafe { $ctlz(self as $ActualT) as u32 }
         }
 
-        #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(stage0)]
-        #[inline]
-        pub fn trailing_zeros(self) -> u32 {
-            // As of LLVM 3.6 the codegen for the zero-safe cttz8 intrinsic
-            // emits two conditional moves on x86_64. By promoting the value to
-            // u16 and setting bit 8, we get better code without any conditional
-            // operations.
-            // FIXME: There's a LLVM patch (http://reviews.llvm.org/D9284)
-            // pending, remove this workaround once LLVM generates better code
-            // for cttz8.
-            unsafe {
-                if $BITS == 8 {
-                    intrinsics::cttz16(self as u16 | 0x100) as u32
-                } else {
-                    $cttz(self as $ActualT) as u32
-                }
-            }
-        }
         /// Returns the number of trailing zeros in the binary representation
         /// of `self`.
         ///
@@ -1012,7 +932,6 @@ macro_rules! uint_impl {
         /// assert_eq!(n.trailing_zeros(), 3);
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(not(stage0))]
         #[inline]
         pub fn trailing_zeros(self) -> u32 {
             // As of LLVM 3.6 the codegen for the zero-safe cttz8 intrinsic
@@ -1563,19 +1482,6 @@ macro_rules! uint_impl {
 }
 
 #[lang = "u8"]
-#[cfg(stage0)]
-impl u8 {
-    uint_impl! { u8, 8,
-        intrinsics::ctpop8,
-        intrinsics::ctlz8,
-        intrinsics::cttz8,
-        bswap8,
-        intrinsics::u8_add_with_overflow,
-        intrinsics::u8_sub_with_overflow,
-        intrinsics::u8_mul_with_overflow }
-}
-#[lang = "u8"]
-#[cfg(not(stage0))]
 impl u8 {
     uint_impl! { u8, 8,
         intrinsics::ctpop,
@@ -1588,19 +1494,6 @@ impl u8 {
 }
 
 #[lang = "u16"]
-#[cfg(stage0)]
-impl u16 {
-    uint_impl! { u16, 16,
-        intrinsics::ctpop16,
-        intrinsics::ctlz16,
-        intrinsics::cttz16,
-        intrinsics::bswap16,
-        intrinsics::u16_add_with_overflow,
-        intrinsics::u16_sub_with_overflow,
-        intrinsics::u16_mul_with_overflow }
-}
-#[lang = "u16"]
-#[cfg(not(stage0))]
 impl u16 {
     uint_impl! { u16, 16,
         intrinsics::ctpop,
@@ -1613,19 +1506,6 @@ impl u16 {
 }
 
 #[lang = "u32"]
-#[cfg(stage0)]
-impl u32 {
-    uint_impl! { u32, 32,
-        intrinsics::ctpop32,
-        intrinsics::ctlz32,
-        intrinsics::cttz32,
-        intrinsics::bswap32,
-        intrinsics::u32_add_with_overflow,
-        intrinsics::u32_sub_with_overflow,
-        intrinsics::u32_mul_with_overflow }
-}
-#[lang = "u32"]
-#[cfg(not(stage0))]
 impl u32 {
     uint_impl! { u32, 32,
         intrinsics::ctpop,
@@ -1638,19 +1518,6 @@ impl u32 {
 }
 
 #[lang = "u64"]
-#[cfg(stage0)]
-impl u64 {
-    uint_impl! { u64, 64,
-        intrinsics::ctpop64,
-        intrinsics::ctlz64,
-        intrinsics::cttz64,
-        intrinsics::bswap64,
-        intrinsics::u64_add_with_overflow,
-        intrinsics::u64_sub_with_overflow,
-        intrinsics::u64_mul_with_overflow }
-}
-#[lang = "u64"]
-#[cfg(not(stage0))]
 impl u64 {
     uint_impl! { u64, 64,
         intrinsics::ctpop,
@@ -1664,20 +1531,6 @@ impl u64 {
 
 #[cfg(target_pointer_width = "32")]
 #[lang = "usize"]
-#[cfg(stage0)]
-impl usize {
-    uint_impl! { u32, 32,
-        intrinsics::ctpop32,
-        intrinsics::ctlz32,
-        intrinsics::cttz32,
-        intrinsics::bswap32,
-        intrinsics::u32_add_with_overflow,
-        intrinsics::u32_sub_with_overflow,
-        intrinsics::u32_mul_with_overflow }
-}
-#[cfg(target_pointer_width = "32")]
-#[lang = "usize"]
-#[cfg(not(stage0))]
 impl usize {
     uint_impl! { u32, 32,
         intrinsics::ctpop,
@@ -1691,20 +1544,6 @@ impl usize {
 
 #[cfg(target_pointer_width = "64")]
 #[lang = "usize"]
-#[cfg(stage0)]
-impl usize {
-    uint_impl! { u64, 64,
-        intrinsics::ctpop64,
-        intrinsics::ctlz64,
-        intrinsics::cttz64,
-        intrinsics::bswap64,
-        intrinsics::u64_add_with_overflow,
-        intrinsics::u64_sub_with_overflow,
-        intrinsics::u64_mul_with_overflow }
-}
-#[cfg(target_pointer_width = "64")]
-#[lang = "usize"]
-#[cfg(not(stage0))]
 impl usize {
     uint_impl! { u64, 64,
         intrinsics::ctpop,
diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs
index 88f71e63da6..a7d5fcafd56 100644
--- a/src/libcore/num/wrapping.rs
+++ b/src/libcore/num/wrapping.rs
@@ -12,30 +12,7 @@
 #![unstable(feature = "wrapping", reason = "may be removed or relocated",
             issue = "27755")]
 
-#[cfg(stage0)]
-pub use intrinsics::{
-    u8_add_with_overflow, i8_add_with_overflow,
-    u16_add_with_overflow, i16_add_with_overflow,
-    u32_add_with_overflow, i32_add_with_overflow,
-    u64_add_with_overflow, i64_add_with_overflow,
-
-    u8_sub_with_overflow, i8_sub_with_overflow,
-    u16_sub_with_overflow, i16_sub_with_overflow,
-    u32_sub_with_overflow, i32_sub_with_overflow,
-    u64_sub_with_overflow, i64_sub_with_overflow,
-
-    u8_mul_with_overflow, i8_mul_with_overflow,
-    u16_mul_with_overflow, i16_mul_with_overflow,
-    u32_mul_with_overflow, i32_mul_with_overflow,
-    u64_mul_with_overflow, i64_mul_with_overflow,
-};
-
-#[cfg(not(stage0))]
-pub use intrinsics::{
-    add_with_overflow,
-    sub_with_overflow,
-    mul_with_overflow,
-};
+pub use intrinsics::{add_with_overflow, sub_with_overflow, mul_with_overflow};
 
 use super::Wrapping;
 
@@ -203,42 +180,18 @@ macro_rules! signed_overflowing_impl {
     ($($t:ident)*) => ($(
         impl OverflowingOps for $t {
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_add(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _add_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_add(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     add_with_overflow(self, rhs)
                 }
             }
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _sub_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     sub_with_overflow(self, rhs)
                 }
             }
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _mul_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     mul_with_overflow(self, rhs)
@@ -289,42 +242,18 @@ macro_rules! unsigned_overflowing_impl {
     ($($t:ident)*) => ($(
         impl OverflowingOps for $t {
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_add(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _add_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_add(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     add_with_overflow(self, rhs)
                 }
             }
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _sub_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_sub(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     sub_with_overflow(self, rhs)
                 }
             }
             #[inline(always)]
-            #[cfg(stage0)]
-            fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
-                unsafe {
-                    concat_idents!($t, _mul_with_overflow)(self, rhs)
-                }
-            }
-            #[inline(always)]
-            #[cfg(not(stage0))]
             fn overflowing_mul(self, rhs: $t) -> ($t, bool) {
                 unsafe {
                     mul_with_overflow(self, rhs)
@@ -365,45 +294,18 @@ unsigned_overflowing_impl! { u8 u16 u32 u64 }
 #[cfg(target_pointer_width = "64")]
 impl OverflowingOps for usize {
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_add(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u64_add_with_overflow(self as u64, rhs as u64);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_add(self, rhs: usize) -> (usize, bool) {
         unsafe {
             add_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u64_sub_with_overflow(self as u64, rhs as u64);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
         unsafe {
             sub_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u64_mul_with_overflow(self as u64, rhs as u64);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
         unsafe {
             mul_with_overflow(self, rhs)
@@ -439,45 +341,18 @@ impl OverflowingOps for usize {
 #[cfg(target_pointer_width = "32")]
 impl OverflowingOps for usize {
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_add(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u32_add_with_overflow(self as u32, rhs as u32);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_add(self, rhs: usize) -> (usize, bool) {
         unsafe {
             add_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u32_sub_with_overflow(self as u32, rhs as u32);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_sub(self, rhs: usize) -> (usize, bool) {
         unsafe {
             sub_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
-        unsafe {
-            let res = u32_mul_with_overflow(self as u32, rhs as u32);
-            (res.0 as usize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_mul(self, rhs: usize) -> (usize, bool) {
         unsafe {
             mul_with_overflow(self, rhs)
@@ -513,45 +388,18 @@ impl OverflowingOps for usize {
 #[cfg(target_pointer_width = "64")]
 impl OverflowingOps for isize {
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_add(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i64_add_with_overflow(self as i64, rhs as i64);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_add(self, rhs: isize) -> (isize, bool) {
         unsafe {
             add_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i64_sub_with_overflow(self as i64, rhs as i64);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
         unsafe {
             sub_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i64_mul_with_overflow(self as i64, rhs as i64);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
         unsafe {
             mul_with_overflow(self, rhs)
@@ -587,45 +435,18 @@ impl OverflowingOps for isize {
 #[cfg(target_pointer_width = "32")]
 impl OverflowingOps for isize {
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_add(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i32_add_with_overflow(self as i32, rhs as i32);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_add(self, rhs: isize) -> (isize, bool) {
         unsafe {
             add_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i32_sub_with_overflow(self as i32, rhs as i32);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_sub(self, rhs: isize) -> (isize, bool) {
         unsafe {
             sub_with_overflow(self, rhs)
         }
     }
     #[inline(always)]
-    #[cfg(stage0)]
-    fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
-        unsafe {
-            let res = i32_mul_with_overflow(self as i32, rhs as i32);
-            (res.0 as isize, res.1)
-        }
-    }
-    #[inline(always)]
-    #[cfg(not(stage0))]
     fn overflowing_mul(self, rhs: isize) -> (isize, bool) {
         unsafe {
             mul_with_overflow(self, rhs)
diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs
index dd4702376d4..edbe64db080 100644
--- a/src/libcore/ops.rs
+++ b/src/libcore/ops.rs
@@ -441,7 +441,6 @@ macro_rules! rem_impl_integer {
 
 rem_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
-#[cfg(not(stage0))]
 macro_rules! rem_impl_float {
     ($($t:ty)*) => ($(
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -456,48 +455,8 @@ macro_rules! rem_impl_float {
     )*)
 }
 
-#[cfg(not(stage0))]
 rem_impl_float! { f32 f64 }
 
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-impl Rem for f32 {
-    type Output = f32;
-
-    // The builtin f32 rem operator is broken when targeting
-    // MSVC; see comment in std::f32::floor.
-    // FIXME: See also #27859.
-    #[inline]
-    #[cfg(target_env = "msvc")]
-    fn rem(self, other: f32) -> f32 {
-        (self as f64).rem(other as f64) as f32
-    }
-
-    #[inline]
-    #[cfg(not(target_env = "msvc"))]
-    fn rem(self, other: f32) -> f32 {
-        extern { fn fmodf(a: f32, b: f32) -> f32; }
-        unsafe { fmodf(self, other) }
-    }
-}
-
-#[stable(feature = "rust1", since = "1.0.0")]
-#[cfg(stage0)]
-impl Rem for f64 {
-    type Output = f64;
-
-    #[inline]
-    fn rem(self, other: f64) -> f64 {
-        extern { fn fmod(a: f64, b: f64) -> f64; }
-        unsafe { fmod(self, other) }
-    }
-}
-
-#[cfg(stage0)]
-forward_ref_binop! { impl Rem, rem for f64, f64 }
-#[cfg(stage0)]
-forward_ref_binop! { impl Rem, rem for f32, f32 }
-
 /// The `Neg` trait is used to specify the functionality of unary `-`.
 ///
 /// # Examples
@@ -954,7 +913,6 @@ shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
 ///     foo += Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "add_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait AddAssign<Rhs=Self> {
@@ -962,7 +920,6 @@ pub trait AddAssign<Rhs=Self> {
     fn add_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! add_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -973,7 +930,6 @@ macro_rules! add_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
 /// The `SubAssign` trait is used to specify the functionality of `-=`.
@@ -1004,7 +960,6 @@ add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 ///     foo -= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "sub_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait SubAssign<Rhs=Self> {
@@ -1012,7 +967,6 @@ pub trait SubAssign<Rhs=Self> {
     fn sub_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! sub_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1023,7 +977,6 @@ macro_rules! sub_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
 /// The `MulAssign` trait is used to specify the functionality of `*=`.
@@ -1054,7 +1007,6 @@ sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 ///     foo *= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "mul_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait MulAssign<Rhs=Self> {
@@ -1062,7 +1014,6 @@ pub trait MulAssign<Rhs=Self> {
     fn mul_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! mul_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1073,7 +1024,6 @@ macro_rules! mul_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
 /// The `DivAssign` trait is used to specify the functionality of `/=`.
@@ -1104,7 +1054,6 @@ mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 ///     foo /= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "div_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait DivAssign<Rhs=Self> {
@@ -1112,7 +1061,6 @@ pub trait DivAssign<Rhs=Self> {
     fn div_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! div_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1123,7 +1071,6 @@ macro_rules! div_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
 /// The `RemAssign` trait is used to specify the functionality of `%=`.
@@ -1154,7 +1101,6 @@ div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 ///     foo %= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "rem_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait RemAssign<Rhs=Self> {
@@ -1162,7 +1108,6 @@ pub trait RemAssign<Rhs=Self> {
     fn rem_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! rem_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1173,7 +1118,6 @@ macro_rules! rem_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 
 /// The `BitAndAssign` trait is used to specify the functionality of `&=`.
@@ -1204,7 +1148,6 @@ rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
 ///     foo &= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "bitand_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait BitAndAssign<Rhs=Self> {
@@ -1212,7 +1155,6 @@ pub trait BitAndAssign<Rhs=Self> {
     fn bitand_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! bitand_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1223,7 +1165,6 @@ macro_rules! bitand_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
 /// The `BitOrAssign` trait is used to specify the functionality of `|=`.
@@ -1254,7 +1195,6 @@ bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 ///     foo |= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "bitor_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait BitOrAssign<Rhs=Self> {
@@ -1262,7 +1202,6 @@ pub trait BitOrAssign<Rhs=Self> {
     fn bitor_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! bitor_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1273,7 +1212,6 @@ macro_rules! bitor_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
 /// The `BitXorAssign` trait is used to specify the functionality of `^=`.
@@ -1304,7 +1242,6 @@ bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 ///     foo ^= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "bitxor_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait BitXorAssign<Rhs=Self> {
@@ -1312,7 +1249,6 @@ pub trait BitXorAssign<Rhs=Self> {
     fn bitxor_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! bitxor_assign_impl {
     ($($t:ty)+) => ($(
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1323,7 +1259,6 @@ macro_rules! bitxor_assign_impl {
     )+)
 }
 
-#[cfg(not(stage0))]
 bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 
 /// The `ShlAssign` trait is used to specify the functionality of `<<=`.
@@ -1354,7 +1289,6 @@ bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
 ///     foo <<= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "shl_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait ShlAssign<Rhs> {
@@ -1362,7 +1296,6 @@ pub trait ShlAssign<Rhs> {
     fn shl_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! shl_assign_impl {
     ($t:ty, $f:ty) => (
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1375,7 +1308,6 @@ macro_rules! shl_assign_impl {
     )
 }
 
-#[cfg(not(stage0))]
 macro_rules! shl_assign_impl_all {
     ($($t:ty)*) => ($(
         shl_assign_impl! { $t, u8 }
@@ -1392,7 +1324,6 @@ macro_rules! shl_assign_impl_all {
     )*)
 }
 
-#[cfg(not(stage0))]
 shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
 
 /// The `ShrAssign` trait is used to specify the functionality of `>>=`.
@@ -1423,7 +1354,6 @@ shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
 ///     foo >>= Foo;
 /// }
 /// ```
-#[cfg(not(stage0))]
 #[lang = "shr_assign"]
 #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
 pub trait ShrAssign<Rhs=Self> {
@@ -1431,7 +1361,6 @@ pub trait ShrAssign<Rhs=Self> {
     fn shr_assign(&mut self, Rhs);
 }
 
-#[cfg(not(stage0))]
 macro_rules! shr_assign_impl {
     ($t:ty, $f:ty) => (
         #[unstable(feature = "op_assign_traits", reason = "recently added", issue = "28235")]
@@ -1444,7 +1373,6 @@ macro_rules! shr_assign_impl {
     )
 }
 
-#[cfg(not(stage0))]
 macro_rules! shr_assign_impl_all {
     ($($t:ty)*) => ($(
         shr_assign_impl! { $t, u8 }
@@ -1461,7 +1389,6 @@ macro_rules! shr_assign_impl_all {
     )*)
 }
 
-#[cfg(not(stage0))]
 shr_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
 
 /// The `Index` trait is used to specify the functionality of indexing operations
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 53ef9cd0902..e1e7869d548 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -499,28 +499,12 @@ unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
 #[unstable(feature = "unique", issue = "27730")]
 unsafe impl<T: Sync + ?Sized> Sync for Unique<T> { }
 
-#[cfg(stage0)]
-macro_rules! unique_new {
-    () => (
-        /// Creates a new `Unique`.
-        pub unsafe fn new(ptr: *mut T) -> Unique<T> {
-            Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
-        }
-    )
-}
-#[cfg(not(stage0))]
-macro_rules! unique_new {
-    () => (
-        /// Creates a new `Unique`.
-        pub const unsafe fn new(ptr: *mut T) -> Unique<T> {
-            Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
-        }
-    )
-}
-
 #[unstable(feature = "unique", issue = "27730")]
 impl<T: ?Sized> Unique<T> {
-    unique_new!{}
+    /// Creates a new `Unique`.
+    pub const unsafe fn new(ptr: *mut T) -> Unique<T> {
+        Unique { pointer: NonZero::new(ptr), _marker: PhantomData }
+    }
 
     /// Dereferences the content.
     pub unsafe fn get(&self) -> &T {
@@ -533,7 +517,6 @@ impl<T: ?Sized> Unique<T> {
     }
 }
 
-#[cfg(not(stage0))] // remove cfg after new snapshot
 #[unstable(feature = "unique", issue = "27730")]
 impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> { }
 
@@ -598,7 +581,6 @@ impl<T: ?Sized> Clone for Shared<T> {
 #[unstable(feature = "shared", issue = "27730")]
 impl<T: ?Sized> Copy for Shared<T> { }
 
-#[cfg(not(stage0))] // remove cfg after new snapshot
 #[unstable(feature = "shared", issue = "27730")]
 impl<T: ?Sized, U: ?Sized> CoerceUnsized<Shared<U>> for Shared<T> where T: Unsize<U> { }
 
diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs
index 02810bf668a..a60a1c67e17 100644
--- a/src/libflate/lib.rs
+++ b/src/libflate/lib.rs
@@ -14,11 +14,8 @@
 //! [def]: https://en.wikipedia.org/wiki/DEFLATE
 //! [mz]: https://code.google.com/p/miniz/
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "flate"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -30,7 +27,6 @@
 #![feature(staged_api)]
 #![feature(unique)]
 #![cfg_attr(test, feature(rustc_private, rand, vec_push_all))]
-#![cfg_attr(stage0, allow(improper_ctypes))]
 
 #[cfg(test)]
 #[macro_use]
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index 6e185c674a6..7a229ad5222 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -14,11 +14,8 @@
 //! Parsing does not happen at runtime: structures of `std::fmt::rt` are
 //! generated instead.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "fmt_macros"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index 228ceb92da6..57ce53e73b0 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -77,14 +77,10 @@
 //! }
 //! ```
 
-
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "getopts"]
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `getopts` library instead",
             issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index c1bd188d3a2..b9fd5cc1910 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -271,12 +271,9 @@
 //!
 //! * [DOT language](http://www.graphviz.org/doc/info/lang.html)
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "graphviz"]
 #![unstable(feature = "rustc_private", issue = "27812")]
 #![feature(staged_api)]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs
index 404bbd902bf..dbd553acd68 100644
--- a/src/liblog/lib.rs
+++ b/src/liblog/lib.rs
@@ -156,13 +156,10 @@
 //! they're turned off (just a load and an integer comparison). This also means that
 //! if logging is disabled, none of the components of the log will be executed.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "log"]
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `log` library instead",
             issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index 013efb129d8..06f4c8dfd20 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -16,8 +16,6 @@
 //! is not recommended to use this library directly, but rather the official
 //! interface through `std::rand`.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rand"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
@@ -26,7 +24,6 @@
        html_playground_url = "https://play.rust-lang.org/",
        test(attr(deny(warnings))))]
 #![no_std]
-#![cfg_attr(stage0, staged_api)]
 #![unstable(feature = "rand",
             reason = "use `rand` from crates.io",
             issue = "27703")]
@@ -37,7 +34,6 @@
 #![feature(step_by)]
 #![feature(custom_attribute)]
 #![allow(unused_attributes)]
-#![cfg_attr(stage0, feature(no_std))]
 
 #![cfg_attr(test, feature(test, rand, rustc_private, iter_order_deprecated))]
 
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs
index 3c0c9951613..d8d6ea93f75 100644
--- a/src/librbml/lib.rs
+++ b/src/librbml/lib.rs
@@ -111,11 +111,8 @@
 //!
 //! First 0x20 tags are reserved by RBML; custom tags start at 0x20.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rbml"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs
index 0890594f2b1..00d6237b855 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -14,11 +14,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc/middle/expr_use_visitor.rs b/src/librustc/middle/expr_use_visitor.rs
index ff3e99d487c..0273d1a76e9 100644
--- a/src/librustc/middle/expr_use_visitor.rs
+++ b/src/librustc/middle/expr_use_visitor.rs
@@ -242,8 +242,6 @@ impl OverloadedCallType {
 // mem_categorization, it requires a TYPER, which is a type that
 // supplies types from the tree. After type checking is complete, you
 // can just use the tcx as the typer.
-//
-// FIXME(stage0): the :'t here is probably only important for stage0
 pub struct ExprUseVisitor<'d, 't, 'a: 't, 'tcx:'a+'d> {
     typer: &'t infer::InferCtxt<'a, 'tcx>,
     mc: mc::MemCategorizationContext<'t, 'a, 'tcx>,
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs
index 2a3d9cfa6b8..b5d259d9ac9 100644
--- a/src/librustc/util/common.rs
+++ b/src/librustc/util/common.rs
@@ -90,7 +90,6 @@ fn get_resident() -> Option<usize> {
 }
 
 #[cfg(windows)]
-#[cfg_attr(stage0, allow(improper_ctypes))]
 fn get_resident() -> Option<usize> {
     type BOOL = i32;
     type DWORD = u32;
diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs
index 700cfb645bf..844f4925bd2 100644
--- a/src/librustc_back/lib.rs
+++ b/src/librustc_back/lib.rs
@@ -21,11 +21,8 @@
 //! one that doesn't; the one that doesn't might get decent parallel
 //! build speedups.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_back"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs
index 97816a2b2ae..e2a929f58e1 100644
--- a/src/librustc_bitflags/lib.rs
+++ b/src/librustc_bitflags/lib.rs
@@ -9,14 +9,10 @@
 // except according to those terms.
 
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_bitflags"]
 #![feature(associated_consts)]
 #![feature(staged_api)]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
-#![cfg_attr(stage0, feature(no_std))]
 #![no_std]
 #![unstable(feature = "rustc_private", issue = "27812")]
 
diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs
index 27cd9530c9b..0e1102bd77e 100644
--- a/src/librustc_borrowck/lib.rs
+++ b/src/librustc_borrowck/lib.rs
@@ -8,11 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_borrowck"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 0ea7cfa3902..3bba7d651ad 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -16,13 +16,10 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_data_structures"]
 #![unstable(feature = "rustc_private", issue = "27812")]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
-#![cfg_attr(stage0, staged_api)]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 8cfaec62f47..210b1a26c21 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -14,11 +14,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_driver"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -32,7 +29,6 @@
 #![feature(rustc_private)]
 #![feature(set_stdio)]
 #![feature(staged_api)]
-#![feature(raw)] // remove after snapshot
 
 extern crate arena;
 extern crate flate;
@@ -105,24 +101,6 @@ pub mod target_features;
 const BUG_REPORT_URL: &'static str = "https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.\
                                       md#bug-reports";
 
-// SNAP 1af31d4
-// This is a terrible hack. Our stage0 is older than 1.4 and does not
-// support DST coercions, so this function performs the corecion
-// manually. This should go away.
-pub fn cstore_to_cratestore(a: Rc<CStore>) -> Rc<for<'s> CrateStore<'s>>
-{
-    use std::mem;
-    use std::raw::TraitObject;
-    unsafe {
-        let TraitObject { vtable, .. } =
-            mem::transmute::<&for<'s> CrateStore<'s>, TraitObject>(&*a);
-        mem::transmute(TraitObject {
-            data: mem::transmute(a),
-            vtable: vtable
-        })
-    }
-}
-
 pub fn run(args: Vec<String>) -> isize {
     monitor(move || run_compiler(&args, &mut RustcDefaultCalls));
     0
@@ -159,8 +137,8 @@ pub fn run_compiler<'a>(args: &[String], callbacks: &mut CompilerCalls<'a>) {
     };
 
     let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-    let cstore_ = cstore_to_cratestore(cstore.clone());
-    let mut sess = build_session(sopts, input_file_path, descriptions, cstore_);
+    let mut sess = build_session(sopts, input_file_path, descriptions,
+                                 cstore.clone());
     rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
     if sess.unstable_options() {
         sess.opts.show_span = matches.opt_str("show-span");
@@ -356,8 +334,8 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls {
                     return None;
                 }
                 let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-                let cstore_ = cstore_to_cratestore(cstore.clone());
-                let sess = build_session(sopts.clone(), None, descriptions.clone(), cstore_);
+                let sess = build_session(sopts.clone(), None, descriptions.clone(),
+                                         cstore.clone());
                 rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
                 let should_stop = RustcDefaultCalls::print_crate_info(&sess, None, odir, ofile);
                 if should_stop == Compilation::Stop {
diff --git a/src/librustc_front/lib.rs b/src/librustc_front/lib.rs
index 60080854a6f..b12c41d060a 100644
--- a/src/librustc_front/lib.rs
+++ b/src/librustc_front/lib.rs
@@ -14,11 +14,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_front"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index 1d0c616c3b7..80ef334fe18 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -19,11 +19,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_lint"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs
index ebb0caa0dfa..e2217e367a0 100644
--- a/src/librustc_llvm/lib.rs
+++ b/src/librustc_llvm/lib.rs
@@ -8,19 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![allow(non_upper_case_globals)]
 #![allow(non_camel_case_types)]
 #![allow(non_snake_case)]
 #![allow(dead_code)]
 #![allow(trivial_casts)]
 
-#![cfg_attr(stage0, allow(improper_ctypes))]
-
 #![crate_name = "rustc_llvm"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs
index c425ba1386e..42332c46969 100644
--- a/src/librustc_metadata/lib.rs
+++ b/src/librustc_metadata/lib.rs
@@ -8,10 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_metadata"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs
index 3de6863652a..e857434682d 100644
--- a/src/librustc_platform_intrinsics/lib.rs
+++ b/src/librustc_platform_intrinsics/lib.rs
@@ -8,10 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_platform_intrinsics"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![feature(staged_api, rustc_private)]
diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs
index 5dedef7ab6c..333c226c2a3 100644
--- a/src/librustc_plugin/lib.rs
+++ b/src/librustc_plugin/lib.rs
@@ -50,10 +50,8 @@
 //! See the [Plugins Chapter](../../book/compiler-plugins.html) of the book
 //! for more examples.
 
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_plugin"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index 9a869b24b8f..d1a894c61f7 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -8,11 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_privacy"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 3f7327e700b..5711807a617 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -8,11 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_resolve"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index 83d0106fd4c..a17e0a4ccd7 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -14,11 +14,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_trans"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index c0ede6370f1..70c6d6f05c6 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -62,11 +62,9 @@ independently:
 This API is completely unstable and subject to change.
 
 */
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
+
 #![crate_name = "rustc_typeck"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/librustc_unicode/lib.rs b/src/librustc_unicode/lib.rs
index 8bde24d2b0c..161da079110 100644
--- a/src/librustc_unicode/lib.rs
+++ b/src/librustc_unicode/lib.rs
@@ -20,11 +20,8 @@
 //! provide for basic string-related manipulations. This crate does not
 //! (yet) aim to provide a full set of Unicode tables.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustc_unicode"]
 #![unstable(feature = "unicode", issue = "27783")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
@@ -34,9 +31,6 @@
        test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
 #![no_std]
 
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, feature(no_std))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(core_char_ext)]
 #![feature(lang_items)]
 #![feature(staged_api)]
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index c6c98851f7c..d7190a4bea9 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -125,8 +125,8 @@ pub fn run_core(search_paths: SearchPaths, cfgs: Vec<String>, externs: Externs,
                                                   codemap.clone());
 
     let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-    let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
-    let sess = session::build_session_(sessopts, cpath, diagnostic_handler, codemap, cstore_);
+    let sess = session::build_session_(sessopts, cpath, diagnostic_handler,
+                                       codemap, cstore.clone());
     rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
 
     let mut cfg = config::build_configuration(&sess);
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 31fdc1170c0..ffda261c24f 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -8,17 +8,14 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "rustdoc"]
 #![unstable(feature = "rustdoc", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-   html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
-   html_root_url = "https://doc.rust-lang.org/nightly/",
-   html_playground_url = "https://play.rust-lang.org/")]
+       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
+       html_root_url = "https://doc.rust-lang.org/nightly/",
+       html_playground_url = "https://play.rust-lang.org/")]
 
 #![feature(box_patterns)]
 #![feature(box_syntax)]
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index fde8299d2d2..7aa97d3652f 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -80,12 +80,11 @@ pub fn run(input: &str,
                                                   codemap.clone());
 
     let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-    let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
     let sess = session::build_session_(sessopts,
                                        Some(input_path.clone()),
                                        diagnostic_handler,
                                        codemap,
-                                       cstore_);
+                                       cstore.clone());
     rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
 
     let mut cfg = config::build_configuration(&sess);
@@ -235,12 +234,11 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
     let diagnostic_handler = errors::Handler::with_emitter(true, false, box emitter);
 
     let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-    let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
     let sess = session::build_session_(sessopts,
                                        None,
                                        diagnostic_handler,
                                        codemap,
-                                       cstore_);
+                                       cstore.clone());
     rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
 
     let outdir = TempDir::new("rustdoctest").ok().expect("rustdoc needs a tempdir");
diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs
index c919c335640..2941f6f8a02 100644
--- a/src/libserialize/lib.rs
+++ b/src/libserialize/lib.rs
@@ -14,13 +14,10 @@
 Core encoding and decoding interfaces.
 */
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "serialize"]
 #![unstable(feature = "rustc_private",
             reason = "deprecated in favor of rustc-serialize on crates.io",
             issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index eba0c799cd2..cc158eba3c2 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -199,11 +199,8 @@
 //! [other]: #what-is-in-the-standard-library-documentation
 //! [primitive types]: ../book/primitive-types.html
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "std"]
 #![stable(feature = "rust1", since = "1.0.0")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -214,12 +211,6 @@
        test(no_crate_inject, attr(deny(warnings))),
        test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
 
-#![cfg_attr(stage0, allow(unused_attributes))]
-#![cfg_attr(stage0, allow(improper_ctypes))]
-
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, feature(no_std))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(alloc)]
 #![feature(allow_internal_unstable)]
 #![feature(asm)]
diff --git a/src/libstd/rand/os.rs b/src/libstd/rand/os.rs
index 13965ce810d..c11212b3ae0 100644
--- a/src/libstd/rand/os.rs
+++ b/src/libstd/rand/os.rs
@@ -238,8 +238,6 @@ mod imp {
 
 #[cfg(target_os = "ios")]
 mod imp {
-    #[cfg(stage0)] use prelude::v1::*;
-
     use io;
     use mem;
     use ptr;
diff --git a/src/libstd/sys/common/libunwind.rs b/src/libstd/sys/common/libunwind.rs
index 75bb11216e1..feb05c7b560 100644
--- a/src/libstd/sys/common/libunwind.rs
+++ b/src/libstd/sys/common/libunwind.rs
@@ -131,8 +131,6 @@ extern "C" {
 
     pub fn _Unwind_DeleteException(exception: *mut _Unwind_Exception);
 
-    // remove cfg after new snapshot
-    #[cfg(not(all(stage0, target_os="windows", target_arch="x86_64")))]
     #[unwind]
     pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
 }
diff --git a/src/libstd/sys/common/unwind/mod.rs b/src/libstd/sys/common/unwind/mod.rs
index aea5acc9071..0f10e727461 100644
--- a/src/libstd/sys/common/unwind/mod.rs
+++ b/src/libstd/sys/common/unwind/mod.rs
@@ -88,18 +88,8 @@ use sys_common::mutex::Mutex;
 #[path = "seh.rs"] #[doc(hidden)]
 pub mod imp;
 
-// stage0: i686-pc-windows-gnu
-#[cfg(all(stage0, windows, target_arch = "x86_64", target_env = "gnu"))]
-#[path = "seh64_gnu.rs"] #[doc(hidden)]
-pub mod imp;
-
-// stage0: x86_64-pc-windows-msvc
-#[cfg(all(stage0, windows, target_arch = "x86_64", target_env = "msvc"))]
-#[path = "seh.rs"] #[doc(hidden)]
-pub mod imp;
-
 // x86_64-pc-windows-*
-#[cfg(all(not(stage0), windows, target_arch = "x86_64"))]
+#[cfg(all(windows, target_arch = "x86_64"))]
 #[path = "seh64_gnu.rs"] #[doc(hidden)]
 pub mod imp;
 
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index 5e0368f35cc..34e32d0d5b6 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -17,7 +17,7 @@ use os::raw::{c_char, c_short, c_ulonglong};
 use libc::{wchar_t, size_t, c_void};
 use ptr;
 
-#[cfg_attr(not(stage0), repr(simd))]
+#[repr(simd)]
 #[repr(C)]
 struct u64x2(u64, u64);
 
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 47340d31224..c09e35f1077 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -14,11 +14,8 @@
 //!
 //! This API is completely unstable and subject to change.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "syntax"]
 #![unstable(feature = "rustc_private", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "dylib"]
 #![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
@@ -26,8 +23,6 @@
        html_root_url = "https://doc.rust-lang.org/nightly/",
        test(attr(deny(warnings))))]
 
-#![cfg_attr(stage0, feature(rustc_attrs))]
-#![cfg_attr(stage0, allow(unused_attributes))]
 #![feature(associated_consts)]
 #![feature(filling_drop)]
 #![feature(libc)]
diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs
index 01dc9662588..a032666595e 100644
--- a/src/libsyntax_ext/lib.rs
+++ b/src/libsyntax_ext/lib.rs
@@ -17,8 +17,6 @@
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
 
-#![cfg_attr(stage0, feature(custom_attribute))]
-#![cfg_attr(stage0, staged_api)]
 #![unstable(feature = "rustc_private", issue = "27812")]
 
 #![feature(rustc_private)]
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index 69ad55d7908..d4c9cb8e254 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -40,13 +40,10 @@
 //! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
 //! [ti]: https://en.wikipedia.org/wiki/Terminfo
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "term"]
 #![unstable(feature = "rustc_private",
             reason = "use the crates.io `term` library instead",
             issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index d1bf9090944..20d7c66cf12 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -23,11 +23,8 @@
 // running tests while providing a base that other test frameworks may
 // build off of.
 
-// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
-#![cfg_attr(stage0, feature(custom_attribute))]
 #![crate_name = "test"]
 #![unstable(feature = "test", issue = "27812")]
-#![cfg_attr(stage0, staged_api)]
 #![crate_type = "rlib"]
 #![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/rtstartup/rsbegin.rs b/src/rtstartup/rsbegin.rs
index a81eac279d0..d1b6fe6655a 100644
--- a/src/rtstartup/rsbegin.rs
+++ b/src/rtstartup/rsbegin.rs
@@ -22,8 +22,6 @@
 // object (usually called `crtX.o), which then invokes initialization callbacks
 // of other runtime components (registered via yet another special image section).
 
-#![cfg_attr(stage0, feature(no_std))]
-
 #![crate_type="rlib"]
 #![no_std]
 #![allow(non_camel_case_types)]
diff --git a/src/rtstartup/rsend.rs b/src/rtstartup/rsend.rs
index e3b691ce2f7..5e4e13ebd05 100644
--- a/src/rtstartup/rsend.rs
+++ b/src/rtstartup/rsend.rs
@@ -10,8 +10,6 @@
 
 // See rsbegin.rs for details.
 
-#![cfg_attr(stage0, feature(no_std))]
-
 #![crate_type="rlib"]
 #![no_std]
 
diff --git a/src/snapshots.txt b/src/snapshots.txt
index c59170d523d..81ff9b05172 100644
--- a/src/snapshots.txt
+++ b/src/snapshots.txt
@@ -1,3 +1,11 @@
+S 2015-12-18 3391630
+  linux-i386 a09c4a4036151d0cb28e265101669731600e01f2
+  linux-x86_64 97e2a5eb8904962df8596e95d6e5d9b574d73bf4
+  macos-i386 ca52d2d3ba6497ed007705ee3401cf7efc136ca1
+  macos-x86_64 3c44ffa18f89567c2b81f8d695e711c86d81ffc7
+  winnt-i386 f9056ebd3db9611d31c2dc6dc5f96c7208d5d227
+  winnt-x86_64 a85a40e535d828016181d3aa40afe34c3e36ab8c
+
 S 2015-08-11 1af31d4
   bitrig-x86_64 739e0635cd5a1b3635f1457aae3ef6390ea9a7a8
   freebsd-i386 3cd4a44fb97b3135be3d1b760bea604a381e85dc
diff --git a/src/test/run-make/execution-engine/test.rs b/src/test/run-make/execution-engine/test.rs
index 20dd16872a6..928f2f996a0 100644
--- a/src/test/run-make/execution-engine/test.rs
+++ b/src/test/run-make/execution-engine/test.rs
@@ -215,9 +215,8 @@ fn compile_program(input: &str, sysroot: PathBuf)
     let handle = thread.spawn(move || {
         let opts = build_exec_options(sysroot);
         let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-        let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
         let sess = build_session(opts, None, Registry::new(&rustc::DIAGNOSTICS),
-                                 cstore_);
+                                 cstore.clone());
         rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
 
         let cfg = build_configuration(&sess);
diff --git a/src/test/run-make/issue-19371/foo.rs b/src/test/run-make/issue-19371/foo.rs
index 58bf5049cf1..4b1c84ce64f 100644
--- a/src/test/run-make/issue-19371/foo.rs
+++ b/src/test/run-make/issue-19371/foo.rs
@@ -55,8 +55,7 @@ fn basic_sess(sysroot: PathBuf) -> (Session, Rc<CStore>) {
 
     let descriptions = Registry::new(&rustc::DIAGNOSTICS);
     let cstore = Rc::new(CStore::new(token::get_ident_interner()));
-    let cstore_ = ::rustc_driver::cstore_to_cratestore(cstore.clone());
-    let sess = build_session(opts, None, descriptions, cstore_);
+    let sess = build_session(opts, None, descriptions, cstore.clone());
     rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
     (sess, cstore)
 }