about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2018-06-22 09:48:43 -0600
committerAlex Crichton <alex@alexcrichton.com>2018-06-30 13:17:49 -0700
commitad97f8b491422d947c1c97d8e9f1bfecdb7f47ba (patch)
tree46206c7145336f073d6928bf97dde3941c0a3bbc /src/libcore
parent5d95db34a472dc09a90737c83ab533b840dcd224 (diff)
downloadrust-ad97f8b491422d947c1c97d8e9f1bfecdb7f47ba.tar.gz
rust-ad97f8b491422d947c1c97d8e9f1bfecdb7f47ba.zip
Bootstrap from 1.28.0-beta.3
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs4
-rw-r--r--src/libcore/lib.rs1
-rw-r--r--src/libcore/num/mod.rs192
-rw-r--r--src/libcore/num/wrapping.rs1
-rw-r--r--src/libcore/panic.rs2
-rw-r--r--src/libcore/panicking.rs15
-rw-r--r--src/libcore/ptr.rs27
-rw-r--r--src/libcore/slice/mod.rs3
8 files changed, 1 insertions, 244 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 95f13daf841..89fe2d941a3 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1364,10 +1364,6 @@ extern "rust-intrinsic" {
     /// source as well as std's catch implementation.
     pub fn try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32;
 
-    #[cfg(stage0)]
-    /// docs my friends, its friday!
-    pub fn align_offset(ptr: *const (), align: usize) -> usize;
-
     /// Emits a `!nontemporal` store according to LLVM (see their docs).
     /// Probably will never become stable.
     pub fn nontemporal_store<T>(ptr: *mut T, val: T);
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 40caee85541..cef126f36e8 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -100,7 +100,6 @@
 #![feature(optin_builtin_traits)]
 #![feature(prelude_import)]
 #![feature(repr_simd, platform_intrinsics)]
-#![cfg_attr(stage0, feature(repr_transparent))]
 #![feature(rustc_attrs)]
 #![feature(rustc_const_unstable)]
 #![feature(simd_ffi)]
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 7e2dd304d7f..e0d267a6ce0 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -267,21 +267,12 @@ $EndFeature, "
 ```
 "),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() }
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() }
-        }
-
-        doc_comment! {
             concat!("Returns the number of zeros in the binary representation of `self`.
 
 # Examples
@@ -292,7 +283,6 @@ Basic usage:
 ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 1);", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn count_zeros(self) -> u32 {
@@ -301,16 +291,6 @@ Basic usage:
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentatio"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn count_zeros(self) -> u32 {
-                (!self).count_ones()
-            }
-        }
-
-        doc_comment! {
             concat!("Returns the number of leading zeros in the binary representation of `self`.
 
 # Examples
@@ -324,7 +304,6 @@ assert_eq!(n.leading_zeros(), 0);",
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn leading_zeros(self) -> u32 {
@@ -333,16 +312,6 @@ $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn leading_zeros(self) -> u32 {
-                (self as $UnsignedT).leading_zeros()
-            }
-        }
-
-        doc_comment! {
             concat!("Returns the number of trailing zeros in the binary representation of `self`.
 
 # Examples
@@ -356,7 +325,6 @@ assert_eq!(n.trailing_zeros(), 2);",
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn trailing_zeros(self) -> u32 {
@@ -364,16 +332,6 @@ $EndFeature, "
             }
         }
 
-        doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn trailing_zeros(self) -> u32 {
-                (self as $UnsignedT).trailing_zeros()
-            }
-        }
-
         /// Shifts the bits to the left by a specified amount, `n`,
         /// wrapping the truncated bits to the end of the resulting integer.
         ///
@@ -442,21 +400,12 @@ $EndFeature, "
         /// assert_eq!(m, 21760);
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(not(stage0))]
         #[rustc_const_unstable(feature = "const_int_ops")]
         #[inline]
         pub const fn swap_bytes(self) -> Self {
             (self as $UnsignedT).swap_bytes() as Self
         }
 
-        /// Dummy docs. See !stage0 documentation.
-        #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(stage0)]
-        #[inline]
-        pub fn swap_bytes(self) -> Self {
-            (self as $UnsignedT).swap_bytes() as Self
-        }
-
         /// Reverses the bit pattern of the integer.
         ///
         /// # Examples
@@ -503,7 +452,6 @@ if cfg!(target_endian = \"big\") {
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn from_be(x: Self) -> Self {
@@ -519,16 +467,6 @@ $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn from_be(x: Self) -> Self {
-                if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts an integer from little endian to the target's endianness.
 
 On little endian this is a no-op. On big endian the bytes are swapped.
@@ -548,7 +486,6 @@ if cfg!(target_endian = \"little\") {
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn from_le(x: Self) -> Self {
@@ -564,16 +501,6 @@ $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn from_le(x: Self) -> Self {
-                if cfg!(target_endian = "little") { x } else { x.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts `self` to big endian from the target's endianness.
 
 On big endian this is a no-op. On little endian the bytes are swapped.
@@ -593,7 +520,6 @@ if cfg!(target_endian = \"big\") {
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn to_be(self) -> Self { // or not to be?
@@ -609,16 +535,6 @@ $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn to_be(self) -> Self { // or not to be?
-                if cfg!(target_endian = "big") { self } else { self.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts `self` to little endian from the target's endianness.
 
 On little endian this is a no-op. On big endian the bytes are swapped.
@@ -638,7 +554,6 @@ if cfg!(target_endian = \"little\") {
 $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn to_le(self) -> Self {
@@ -654,16 +569,6 @@ $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn to_le(self) -> Self {
-                if cfg!(target_endian = "little") { self } else { self.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Checked integer addition. Computes `self + rhs`, returning `None`
 if overflow occurred.
 
@@ -2161,7 +2066,6 @@ Basic usage:
 assert_eq!(n.count_ones(), 3);", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn count_ones(self) -> u32 {
@@ -2170,16 +2074,6 @@ assert_eq!(n.count_ones(), 3);", $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn count_ones(self) -> u32 {
-                unsafe { intrinsics::ctpop(self as $ActualT) as u32 }
-            }
-        }
-
-        doc_comment! {
             concat!("Returns the number of zeros in the binary representation of `self`.
 
 # Examples
@@ -2190,7 +2084,6 @@ Basic usage:
 ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 0);", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn count_zeros(self) -> u32 {
@@ -2199,16 +2092,6 @@ Basic usage:
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn count_zeros(self) -> u32 {
-                (!self).count_ones()
-            }
-        }
-
-        doc_comment! {
             concat!("Returns the number of leading zeros in the binary representation of `self`.
 
 # Examples
@@ -2221,7 +2104,6 @@ Basic usage:
 assert_eq!(n.leading_zeros(), 2);", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn leading_zeros(self) -> u32 {
@@ -2230,16 +2112,6 @@ assert_eq!(n.leading_zeros(), 2);", $EndFeature, "
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn leading_zeros(self) -> u32 {
-                unsafe { intrinsics::ctlz(self as $ActualT) as u32 }
-            }
-        }
-
-        doc_comment! {
             concat!("Returns the number of trailing zeros in the binary representation
 of `self`.
 
@@ -2253,7 +2125,6 @@ Basic usage:
 assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn trailing_zeros(self) -> u32 {
@@ -2261,16 +2132,6 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
             }
         }
 
-        doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn trailing_zeros(self) -> u32 {
-                unsafe { uint_cttz_call!(self, $BITS) as u32 }
-            }
-        }
-
         /// Shifts the bits to the left by a specified amount, `n`,
         /// wrapping the truncated bits to the end of the resulting integer.
         ///
@@ -2343,21 +2204,12 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
         /// assert_eq!(m, 21760);
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(not(stage0))]
         #[rustc_const_unstable(feature = "const_int_ops")]
         #[inline]
         pub const fn swap_bytes(self) -> Self {
             unsafe { intrinsics::bswap(self as $ActualT) as Self }
         }
 
-        /// Dummy docs. See !stage0 documentation.
-        #[stable(feature = "rust1", since = "1.0.0")]
-        #[cfg(stage0)]
-        #[inline]
-        pub fn swap_bytes(self) -> Self {
-            unsafe { intrinsics::bswap(self as $ActualT) as Self }
-        }
-
         /// Reverses the bit pattern of the integer.
         ///
         /// # Examples
@@ -2404,7 +2256,6 @@ if cfg!(target_endian = \"big\") {
 }", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn from_be(x: Self) -> Self {
@@ -2420,16 +2271,6 @@ if cfg!(target_endian = \"big\") {
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn from_be(x: Self) -> Self {
-                if cfg!(target_endian = "big") { x } else { x.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts an integer from little endian to the target's endianness.
 
 On little endian this is a no-op. On big endian the bytes are
@@ -2449,7 +2290,6 @@ if cfg!(target_endian = \"little\") {
 }", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn from_le(x: Self) -> Self {
@@ -2465,16 +2305,6 @@ if cfg!(target_endian = \"little\") {
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn from_le(x: Self) -> Self {
-                if cfg!(target_endian = "little") { x } else { x.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts `self` to big endian from the target's endianness.
 
 On big endian this is a no-op. On little endian the bytes are
@@ -2494,7 +2324,6 @@ if cfg!(target_endian = \"big\") {
 }", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn to_be(self) -> Self { // or not to be?
@@ -2510,16 +2339,6 @@ if cfg!(target_endian = \"big\") {
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn to_be(self) -> Self { // or not to be?
-                if cfg!(target_endian = "big") { self } else { self.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Converts `self` to little endian from the target's endianness.
 
 On little endian this is a no-op. On big endian the bytes are
@@ -2539,7 +2358,6 @@ if cfg!(target_endian = \"little\") {
 }", $EndFeature, "
 ```"),
             #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(not(stage0))]
             #[rustc_const_unstable(feature = "const_int_ops")]
             #[inline]
             pub const fn to_le(self) -> Self {
@@ -2555,16 +2373,6 @@ if cfg!(target_endian = \"little\") {
         }
 
         doc_comment! {
-            concat!("Dummy docs. See !stage0 documentation"),
-            #[stable(feature = "rust1", since = "1.0.0")]
-            #[cfg(stage0)]
-            #[inline]
-            pub fn to_le(self) -> Self {
-                if cfg!(target_endian = "little") { self } else { self.swap_bytes() }
-            }
-        }
-
-        doc_comment! {
             concat!("Checked integer addition. Computes `self + rhs`, returning `None`
 if overflow occurred.
 
diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs
index d7f87d37f5b..1c826c2fa76 100644
--- a/src/libcore/num/wrapping.rs
+++ b/src/libcore/num/wrapping.rs
@@ -531,7 +531,6 @@ assert_eq!(n.trailing_zeros(), 3);
             /// assert_eq!(m, Wrapping(-22016));
             /// ```
             #[unstable(feature = "reverse_bits", issue = "48763")]
-            #[cfg(not(stage0))]
             #[inline]
             pub fn reverse_bits(self) -> Self {
                 Wrapping(self.0.reverse_bits())
diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs
index 37ae05309af..1b4129b99fc 100644
--- a/src/libcore/panic.rs
+++ b/src/libcore/panic.rs
@@ -35,7 +35,7 @@ use fmt;
 ///
 /// panic!("Normal panic");
 /// ```
-#[cfg_attr(not(stage0), lang = "panic_info")]
+#[lang = "panic_info"]
 #[stable(feature = "panic_hooks", since = "1.10.0")]
 #[derive(Debug)]
 pub struct PanicInfo<'a> {
diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs
index 0d4f8d1141e..58407de9566 100644
--- a/src/libcore/panicking.rs
+++ b/src/libcore/panicking.rs
@@ -37,7 +37,6 @@
             issue = "0")]
 
 use fmt;
-#[cfg(not(stage0))]
 use panic::{Location, PanicInfo};
 
 #[cold] #[inline(never)] // this is the slow path, always
@@ -61,20 +60,6 @@ fn panic_bounds_check(file_line_col: &(&'static str, u32, u32),
                            len, index), file_line_col)
 }
 
-#[cfg(stage0)]
-#[cold] #[inline(never)]
-pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! {
-    #[allow(improper_ctypes)]
-    extern {
-        #[lang = "panic_fmt"]
-        #[unwind(allowed)]
-        fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !;
-    }
-    let (file, line, col) = *file_line_col;
-    unsafe { panic_impl(fmt, file, line, col) }
-}
-
-#[cfg(not(stage0))]
 #[cold] #[inline(never)]
 pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! {
     // NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 81a8b3ef047..164b29d3515 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -1243,7 +1243,6 @@ impl<T: ?Sized> *const T {
     /// # } }
     /// ```
     #[unstable(feature = "align_offset", issue = "44488")]
-    #[cfg(not(stage0))]
     pub fn align_offset(self, align: usize) -> usize where T: Sized {
         if !align.is_power_of_two() {
             panic!("align_offset: align is not a power-of-two");
@@ -1252,18 +1251,6 @@ impl<T: ?Sized> *const T {
             align_offset(self, align)
         }
     }
-
-    /// definitely docs.
-    #[unstable(feature = "align_offset", issue = "44488")]
-    #[cfg(stage0)]
-    pub fn align_offset(self, align: usize) -> usize where T: Sized {
-        if !align.is_power_of_two() {
-            panic!("align_offset: align is not a power-of-two");
-        }
-        unsafe {
-            intrinsics::align_offset(self as *const (), align)
-        }
-    }
 }
 
 
@@ -2308,7 +2295,6 @@ impl<T: ?Sized> *mut T {
     /// # } }
     /// ```
     #[unstable(feature = "align_offset", issue = "44488")]
-    #[cfg(not(stage0))]
     pub fn align_offset(self, align: usize) -> usize where T: Sized {
         if !align.is_power_of_two() {
             panic!("align_offset: align is not a power-of-two");
@@ -2317,18 +2303,6 @@ impl<T: ?Sized> *mut T {
             align_offset(self, align)
         }
     }
-
-    /// definitely docs.
-    #[unstable(feature = "align_offset", issue = "44488")]
-    #[cfg(stage0)]
-    pub fn align_offset(self, align: usize) -> usize where T: Sized {
-        if !align.is_power_of_two() {
-            panic!("align_offset: align is not a power-of-two");
-        }
-        unsafe {
-            intrinsics::align_offset(self as *const (), align)
-        }
-    }
 }
 
 /// Align pointer `p`.
@@ -2346,7 +2320,6 @@ impl<T: ?Sized> *mut T {
 ///
 /// Any questions go to @nagisa.
 #[lang="align_offset"]
-#[cfg(not(stage0))]
 pub(crate) unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usize {
     /// Calculate multiplicative modular inverse of `x` modulo `m`.
     ///
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index e74e527927d..bcac9322ae8 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -1708,7 +1708,6 @@ impl<T> [T] {
     }
 
     /// Function to calculate lenghts of the middle and trailing slice for `align_to{,_mut}`.
-    #[cfg(not(stage0))]
     fn align_to_offsets<U>(&self) -> (usize, usize) {
         // What we gonna do about `rest` is figure out what multiple of `U`s we can put in a
         // lowest number of `T`s. And how many `T`s we need for each such "multiple".
@@ -1798,7 +1797,6 @@ impl<T> [T] {
     /// }
     /// ```
     #[unstable(feature = "slice_align_to", issue = "44488")]
-    #[cfg(not(stage0))]
     pub unsafe fn align_to<U>(&self) -> (&[T], &[U], &[T]) {
         // Note that most of this function will be constant-evaluated,
         if ::mem::size_of::<U>() == 0 || ::mem::size_of::<T>() == 0 {
@@ -1851,7 +1849,6 @@ impl<T> [T] {
     /// }
     /// ```
     #[unstable(feature = "slice_align_to", issue = "44488")]
-    #[cfg(not(stage0))]
     pub unsafe fn align_to_mut<U>(&mut self) -> (&mut [T], &mut [U], &mut [T]) {
         // Note that most of this function will be constant-evaluated,
         if ::mem::size_of::<U>() == 0 || ::mem::size_of::<T>() == 0 {