diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index fa2b58fb2daa7..91bec69cfa401 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -24,7 +24,7 @@ use Build; use config::Config; // The version number -pub const CFG_RELEASE_NUM: &str = "1.30.0"; +pub const CFG_RELEASE_NUM: &str = "1.31.0"; pub struct GitInfo { inner: Option, diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index f92075cc84e50..5f9ceb8599cf5 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -76,7 +76,6 @@ #![cfg_attr(not(test), feature(fn_traits))] #![cfg_attr(not(test), feature(generator_trait))] -#![cfg_attr(not(stage0), feature(nll))] #![cfg_attr(test, feature(test))] #![feature(allocator_api)] @@ -87,8 +86,7 @@ #![feature(box_syntax)] #![feature(cfg_target_has_atomic)] #![feature(coerce_unsized)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(min_const_fn))] +#![feature(min_const_fn)] #![feature(core_intrinsics)] #![feature(custom_attribute)] #![feature(dropck_eyepatch)] @@ -99,6 +97,7 @@ #![feature(lang_items)] #![feature(libc)] #![feature(needs_allocator)] +#![feature(nll)] #![feature(optin_builtin_traits)] #![feature(pattern)] #![feature(pin)] diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index 6ff39227555fe..b9ba319a943ca 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -11,8 +11,7 @@ #![feature(allocator_api)] #![feature(alloc_system)] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(min_const_fn))] +#![feature(min_const_fn)] #![feature(drain_filter)] #![feature(exact_size_is_empty)] #![feature(pattern)] diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs index bdf0e37a2e672..0065e84a7ad1a 100644 --- a/src/liballoc_jemalloc/lib.rs +++ b/src/liballoc_jemalloc/lib.rs @@ -16,7 +16,7 @@ #![feature(core_intrinsics)] #![feature(libc)] #![feature(linkage)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(staged_api)] #![feature(rustc_attrs)] #![cfg_attr(dummy_jemalloc, allow(dead_code, unused_extern_crates))] @@ -90,7 +90,6 @@ mod contents { // ABI #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rde_alloc(size: usize, align: usize) -> *mut u8 { let flags = align_to_flags(align, size); let ptr = mallocx(size as size_t, flags) as *mut u8; @@ -98,7 +97,6 @@ mod contents { } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rde_dealloc(ptr: *mut u8, size: usize, align: usize) { @@ -107,7 +105,6 @@ mod contents { } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rde_realloc(ptr: *mut u8, _old_size: usize, align: usize, @@ -118,7 +115,6 @@ mod contents { } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rde_alloc_zeroed(size: usize, align: usize) -> *mut u8 { let ptr = if align <= MIN_ALIGN && align <= size { calloc(size as size_t, 1) as *mut u8 diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 65204ebf71413..3ef03ec6d585a 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -17,7 +17,7 @@ #![feature(allocator_api)] #![feature(core_intrinsics)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(staged_api)] #![feature(rustc_attrs)] #![cfg_attr(any(unix, target_os = "cloudabi", target_os = "redox"), feature(libc))] diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 6ad703180c224..b02ae75eff86b 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -26,7 +26,7 @@ #![feature(alloc)] #![feature(core_intrinsics)] #![feature(dropck_eyepatch)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(raw_vec_internals)] #![cfg_attr(test, feature(test))] diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 675e73e952cc2..94e84106328e2 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -91,7 +91,7 @@ #![feature(lang_items)] #![feature(link_llvm_intrinsics)] #![feature(never_type)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(exhaustive_patterns)] #![feature(macro_at_most_once_rep)] #![feature(no_core)] diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index c99c9f96f12d6..9871f4966786d 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -285,19 +285,10 @@ pub fn forget(t: T) { /// [alignment]: ./fn.align_of.html #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg(not(stage0))] pub const fn size_of() -> usize { intrinsics::size_of::() } -#[inline] -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -/// Ceci n'est pas la documentation -pub const fn size_of() -> usize { - unsafe { intrinsics::size_of::() } -} - /// Returns the size of the pointed-to value in bytes. /// /// This is usually the same as `size_of::()`. However, when `T` *has* no @@ -343,20 +334,10 @@ pub fn size_of_val(val: &T) -> usize { #[inline] #[stable(feature = "rust1", since = "1.0.0")] #[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")] -#[cfg(not(stage0))] pub fn min_align_of() -> usize { intrinsics::min_align_of::() } -#[inline] -#[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")] -#[cfg(stage0)] -/// Ceci n'est pas la documentation -pub fn min_align_of() -> usize { - unsafe { intrinsics::min_align_of::() } -} - /// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to. /// /// Every reference to a value of the type `T` must be a multiple of this number. @@ -395,19 +376,10 @@ pub fn min_align_of_val(val: &T) -> usize { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] -#[cfg(not(stage0))] pub const fn align_of() -> usize { intrinsics::min_align_of::() } -#[inline] -#[stable(feature = "rust1", since = "1.0.0")] -#[cfg(stage0)] -/// Ceci n'est pas la documentation -pub const fn align_of() -> usize { - unsafe { intrinsics::min_align_of::() } -} - /// Returns the [ABI]-required minimum alignment of the type of the value that `val` points to. /// /// Every reference to a value of the type `T` must be a multiple of this number. diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 30067d7e163d2..118e75e1ee704 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -14,8 +14,7 @@ use ops::CoerceUnsized; /// A wrapper type for raw pointers and integers that will never be /// NULL or 0 that might allow certain optimizations. -#[cfg_attr(stage0, lang = "non_zero")] -#[cfg_attr(not(stage0), rustc_layout_scalar_valid_range_start(1))] +#[rustc_layout_scalar_valid_range_start(1)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] #[repr(transparent)] pub(crate) struct NonZero(pub(crate) T); diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index c4b59738478dc..f054580cba7bc 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -348,14 +348,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn rotate_left(self, n: u32) -> Self { - (self as $UnsignedT).rotate_left(n) as Self - } - doc_comment! { concat!("Shifts the bits to the left by a specified amount, `n`, wrapping the truncated bits to the end of the resulting integer. @@ -375,20 +367,11 @@ assert_eq!(n.rotate_left(", $rot, "), m); #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_rotate")] #[inline] - #[cfg(not(stage0))] pub const fn rotate_left(self, n: u32) -> Self { (self as $UnsignedT).rotate_left(n) as Self } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn rotate_right(self, n: u32) -> Self { - (self as $UnsignedT).rotate_right(n) as Self - } - doc_comment! { concat!("Shifts the bits to the right by a specified amount, `n`, wrapping the truncated bits to the beginning of the resulting @@ -409,7 +392,6 @@ assert_eq!(n.rotate_right(", $rot, "), m); #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_rotate")] #[inline] - #[cfg(not(stage0))] pub const fn rotate_right(self, n: u32) -> Self { (self as $UnsignedT).rotate_right(n) as Self } @@ -437,14 +419,6 @@ assert_eq!(m, ", $swapped, "); } } - /// no docs here - #[unstable(feature = "reverse_bits", issue = "48763")] - #[inline] - #[cfg(stage0)] - pub fn reverse_bits(self) -> Self { - (self as $UnsignedT).reverse_bits() as Self - } - doc_comment! { concat!("Reverses the bit pattern of the integer. @@ -463,7 +437,6 @@ assert_eq!(m, ", $reversed, "); #[unstable(feature = "reverse_bits", issue = "48763")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn reverse_bits(self) -> Self { (self as $UnsignedT).reverse_bits() as Self } @@ -1014,16 +987,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_add(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_add(self, rhs) - } - } - doc_comment! { concat!("Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the boundary of the type. @@ -1041,7 +1004,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_add(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_add(self, rhs) @@ -1049,16 +1011,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_sub(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_sub(self, rhs) - } - } - doc_comment! { concat!("Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the boundary of the type. @@ -1076,7 +1028,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_sub(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_sub(self, rhs) @@ -1084,16 +1035,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_mul(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_mul(self, rhs) - } - } - doc_comment! { concat!("Wrapping (modular) multiplication. Computes `self * rhs`, wrapping around at the boundary of the type. @@ -1110,7 +1051,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_mul(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_mul(self, rhs) @@ -1254,16 +1194,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "num_wrapping", since = "1.2.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_shl(self, rhs: u32) -> Self { - unsafe { - intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) - } - } - doc_comment! { concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type. @@ -1285,7 +1215,6 @@ $EndFeature, " #[stable(feature = "num_wrapping", since = "1.2.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) @@ -1293,16 +1222,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "num_wrapping", since = "1.2.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_shr(self, rhs: u32) -> Self { - unsafe { - intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) - } - } - doc_comment! { concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask` removes any high-order bits of `rhs` that would cause the shift to exceed the bitwidth of the type. @@ -1324,7 +1243,6 @@ $EndFeature, " #[stable(feature = "num_wrapping", since = "1.2.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) @@ -1403,18 +1321,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_add(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::add_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - doc_comment! { concat!("Calculates `self` + `rhs` @@ -1435,7 +1341,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::add_with_overflow(self as $ActualT, @@ -1445,18 +1350,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_sub(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::sub_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - doc_comment! { concat!("Calculates `self` - `rhs` @@ -1477,7 +1370,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::sub_with_overflow(self as $ActualT, @@ -1487,18 +1379,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::mul_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - doc_comment! { concat!("Calculates the multiplication of `self` and `rhs`. @@ -1517,7 +1397,6 @@ $EndFeature, " #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::mul_with_overflow(self as $ActualT, @@ -1688,14 +1567,6 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_neg(), (", stringify!($Self } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) { - (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) - } - doc_comment! { concat!("Shifts self left by `rhs` bits. @@ -1715,20 +1586,11 @@ $EndFeature, " #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) { - (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) - } - doc_comment! { concat!("Shifts self right by `rhs` bits. @@ -1748,7 +1610,6 @@ $EndFeature, " #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) } @@ -2013,12 +1874,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn is_positive(self) -> bool { self > 0 } - doc_comment! { concat!("Returns `true` if `self` is positive and `false` if the number is zero or negative. @@ -2035,16 +1890,9 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_sign")] #[inline] - #[cfg(not(stage0))] pub const fn is_positive(self) -> bool { self > 0 } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn is_negative(self) -> bool { self < 0 } - doc_comment! { concat!("Returns `true` if `self` is negative and `false` if the number is zero or positive. @@ -2061,18 +1909,9 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_sign")] #[inline] - #[cfg(not(stage0))] pub const fn is_negative(self) -> bool { self < 0 } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_be_bytes(self) -> [u8; mem::size_of::()] { - self.to_be().to_ne_bytes() - } - doc_comment! { concat!("Return the memory representation of this integer as a byte array in big-endian (network) byte order. @@ -2088,20 +1927,11 @@ assert_eq!(bytes, ", $be_bytes, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_be_bytes(self) -> [u8; mem::size_of::()] { self.to_be().to_ne_bytes() } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_le_bytes(self) -> [u8; mem::size_of::()] { - self.to_le().to_ne_bytes() - } - doc_comment! { concat!("Return the memory representation of this integer as a byte array in little-endian byte order. @@ -2117,20 +1947,11 @@ assert_eq!(bytes, ", $le_bytes, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_le_bytes(self) -> [u8; mem::size_of::()] { self.to_le().to_ne_bytes() } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_ne_bytes(self) -> [u8; mem::size_of::()] { - unsafe { mem::transmute(self) } - } - doc_comment! { concat!(" Return the memory representation of this integer as a byte array in @@ -2158,20 +1979,11 @@ assert_eq!(bytes, if cfg!(target_endian = \"big\") { #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_ne_bytes(self) -> [u8; mem::size_of::()] { unsafe { mem::transmute(self) } } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_be_bytes(bytes: [u8; mem::size_of::()]) -> Self { - Self::from_be(Self::from_ne_bytes(bytes)) - } - doc_comment! { concat!("Create an integer value from its representation as a byte array in big endian. @@ -2187,20 +1999,11 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_be_bytes(bytes: [u8; mem::size_of::()]) -> Self { Self::from_be(Self::from_ne_bytes(bytes)) } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_le_bytes(bytes: [u8; mem::size_of::()]) -> Self { - Self::from_le(Self::from_ne_bytes(bytes)) - } - doc_comment! { concat!(" Create an integer value from its representation as a byte array in @@ -2217,20 +2020,11 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_le_bytes(bytes: [u8; mem::size_of::()]) -> Self { Self::from_le(Self::from_ne_bytes(bytes)) } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_ne_bytes(bytes: [u8; mem::size_of::()]) -> Self { - unsafe { mem::transmute(bytes) } - } - doc_comment! { concat!("Create an integer value from its memory representation as a byte array in native endianness. @@ -2257,7 +2051,6 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_ne_bytes(bytes: [u8; mem::size_of::()]) -> Self { unsafe { mem::transmute(bytes) } } @@ -2486,16 +2279,6 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn rotate_left(self, n: u32) -> Self { - // Protect against undefined behaviour for over-long bit shifts - let n = n % $BITS; - (self << n) | (self >> (($BITS - n) % $BITS)) - } - doc_comment! { concat!("Shifts the bits to the left by a specified amount, `n`, wrapping the truncated bits to the end of the resulting integer. @@ -2515,22 +2298,11 @@ assert_eq!(n.rotate_left(", $rot, "), m); #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_rotate")] #[inline] - #[cfg(not(stage0))] pub const fn rotate_left(self, n: u32) -> Self { (self << (n % $BITS)) | (self >> (($BITS - (n % $BITS)) % $BITS)) } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn rotate_right(self, n: u32) -> Self { - // Protect against undefined behaviour for over-long bit shifts - let n = n % $BITS; - (self >> n) | (self << (($BITS - n) % $BITS)) - } - doc_comment! { concat!("Shifts the bits to the right by a specified amount, `n`, wrapping the truncated bits to the beginning of the resulting @@ -2551,7 +2323,6 @@ assert_eq!(n.rotate_right(", $rot, "), m); #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_rotate")] #[inline] - #[cfg(not(stage0))] pub const fn rotate_right(self, n: u32) -> Self { (self >> (n % $BITS)) | (self << (($BITS - (n % $BITS)) % $BITS)) } @@ -2579,14 +2350,6 @@ assert_eq!(m, ", $swapped, "); } } - /// no docs here - #[unstable(feature = "reverse_bits", issue = "48763")] - #[inline] - #[cfg(stage0)] - pub fn reverse_bits(self) -> Self { - unsafe { intrinsics::bitreverse(self as $ActualT) as Self } - } - doc_comment! { concat!("Reverses the bit pattern of the integer. @@ -2605,7 +2368,6 @@ assert_eq!(m, ", $reversed, "); #[unstable(feature = "reverse_bits", issue = "48763")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn reverse_bits(self) -> Self { unsafe { intrinsics::bitreverse(self as $ActualT) as Self } } @@ -3094,16 +2856,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_add(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_add(self, rhs) - } - } - doc_comment! { concat!("Wrapping (modular) addition. Computes `self + rhs`, wrapping around at the boundary of the type. @@ -3120,7 +2872,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_add(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_add(self, rhs) @@ -3128,16 +2879,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_sub(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_sub(self, rhs) - } - } - doc_comment! { concat!("Wrapping (modular) subtraction. Computes `self - rhs`, wrapping around at the boundary of the type. @@ -3154,7 +2895,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_sub(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_sub(self, rhs) @@ -3162,16 +2902,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "rust1", since = "1.0.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_mul(self, rhs: Self) -> Self { - unsafe { - intrinsics::overflowing_mul(self, rhs) - } - } - /// Wrapping (modular) multiplication. Computes `self * /// rhs`, wrapping around at the boundary of the type. /// @@ -3189,7 +2919,6 @@ $EndFeature, " #[stable(feature = "rust1", since = "1.0.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_mul(self, rhs: Self) -> Self { unsafe { intrinsics::overflowing_mul(self, rhs) @@ -3311,16 +3040,6 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_mod_euc(10), 0); self.overflowing_neg().0 } - /// no docs here - #[stable(feature = "num_wrapping", since = "1.2.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_shl(self, rhs: u32) -> Self { - unsafe { - intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) - } - } - doc_comment! { concat!("Panic-free bitwise shift-left; yields `self << mask(rhs)`, where `mask` removes any high-order bits of `rhs` that @@ -3344,7 +3063,6 @@ assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, " #[stable(feature = "num_wrapping", since = "1.2.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { intrinsics::unchecked_shl(self, (rhs & ($BITS - 1)) as $SelfT) @@ -3352,16 +3070,6 @@ assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, " } } - /// no docs here - #[stable(feature = "num_wrapping", since = "1.2.0")] - #[inline] - #[cfg(stage0)] - pub fn wrapping_shr(self, rhs: u32) -> Self { - unsafe { - intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) - } - } - doc_comment! { concat!("Panic-free bitwise shift-right; yields `self >> mask(rhs)`, where `mask` removes any high-order bits of `rhs` that @@ -3385,7 +3093,6 @@ assert_eq!(128", stringify!($SelfT), ".wrapping_shr(128), 128);", $EndFeature, " #[stable(feature = "num_wrapping", since = "1.2.0")] #[rustc_const_unstable(feature = "const_int_wrapping")] #[inline] - #[cfg(not(stage0))] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { intrinsics::unchecked_shr(self, (rhs & ($BITS - 1)) as $SelfT) @@ -3431,18 +3138,6 @@ assert_eq!(3u8.wrapping_pow(6), 217);", $EndFeature, " } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_add(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::add_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - doc_comment! { concat!("Calculates `self` + `rhs` @@ -3463,7 +3158,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndF #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::add_with_overflow(self as $ActualT, @@ -3473,18 +3167,6 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndF } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_sub(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::sub_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - doc_comment! { concat!("Calculates `self` - `rhs` @@ -3506,7 +3188,6 @@ $EndFeature, " #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::sub_with_overflow(self as $ActualT, @@ -3516,18 +3197,6 @@ $EndFeature, " } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - let (a, b) = unsafe { - intrinsics::mul_with_overflow(self as $ActualT, - rhs as $ActualT) - }; - (a as Self, b) - } - /// Calculates the multiplication of `self` and `rhs`. /// /// Returns a tuple of the multiplication along with a boolean @@ -3548,7 +3217,6 @@ $EndFeature, " #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { let (a, b) = unsafe { intrinsics::mul_with_overflow(self as $ActualT, @@ -3687,14 +3355,6 @@ assert_eq!(2", stringify!($SelfT), ".overflowing_neg(), (-2i32 as ", stringify!( } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_shl(self, rhs: u32) -> (Self, bool) { - (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) - } - doc_comment! { concat!("Shifts self left by `rhs` bits. @@ -3715,20 +3375,11 @@ assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(132), (0x10, true));", $E #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) } } - /// no docs here - #[stable(feature = "wrapping", since = "1.7.0")] - #[inline] - #[cfg(stage0)] - pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) { - (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) - } - doc_comment! { concat!("Shifts self right by `rhs` bits. @@ -3749,7 +3400,6 @@ assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $E #[stable(feature = "wrapping", since = "1.7.0")] #[rustc_const_unstable(feature = "const_int_overflowing")] #[inline] - #[cfg(not(stage0))] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) } @@ -3992,15 +3642,7 @@ $EndFeature, " } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_be_bytes(self) -> [u8; mem::size_of::()] { - self.to_be().to_ne_bytes() - } - - doc_comment! { + doc_comment! { concat!("Return the memory representation of this integer as a byte array in big-endian (network) byte order. @@ -4015,20 +3657,11 @@ assert_eq!(bytes, ", $be_bytes, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_be_bytes(self) -> [u8; mem::size_of::()] { self.to_be().to_ne_bytes() } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_le_bytes(self) -> [u8; mem::size_of::()] { - self.to_le().to_ne_bytes() - } - doc_comment! { concat!("Return the memory representation of this integer as a byte array in little-endian byte order. @@ -4044,20 +3677,11 @@ assert_eq!(bytes, ", $le_bytes, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_le_bytes(self) -> [u8; mem::size_of::()] { self.to_le().to_ne_bytes() } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn to_ne_bytes(self) -> [u8; mem::size_of::()] { - unsafe { mem::transmute(self) } - } - doc_comment! { concat!(" Return the memory representation of this integer as a byte array in @@ -4085,20 +3709,11 @@ assert_eq!(bytes, if cfg!(target_endian = \"big\") { #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn to_ne_bytes(self) -> [u8; mem::size_of::()] { unsafe { mem::transmute(self) } } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_be_bytes(bytes: [u8; mem::size_of::()]) -> Self { - Self::from_be(Self::from_ne_bytes(bytes)) - } - doc_comment! { concat!("Create an integer value from its representation as a byte array in big endian. @@ -4114,20 +3729,11 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_be_bytes(bytes: [u8; mem::size_of::()]) -> Self { Self::from_be(Self::from_ne_bytes(bytes)) } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_le_bytes(bytes: [u8; mem::size_of::()]) -> Self { - Self::from_le(Self::from_ne_bytes(bytes)) - } - doc_comment! { concat!(" Create an integer value from its representation as a byte array in @@ -4144,20 +3750,11 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_le_bytes(bytes: [u8; mem::size_of::()]) -> Self { Self::from_le(Self::from_ne_bytes(bytes)) } } - /// no docs here - #[unstable(feature = "int_to_from_bytes", issue = "52963")] - #[inline] - #[cfg(stage0)] - pub fn from_ne_bytes(bytes: [u8; mem::size_of::()]) -> Self { - unsafe { mem::transmute(bytes) } - } - doc_comment! { concat!("Create an integer value from its memory representation as a byte array in native endianness. @@ -4184,7 +3781,6 @@ assert_eq!(value, ", $swap_op, "); #[unstable(feature = "int_to_from_bytes", issue = "52963")] #[rustc_const_unstable(feature = "const_int_conversion")] #[inline] - #[cfg(not(stage0))] pub const fn from_ne_bytes(bytes: [u8; mem::size_of::()]) -> Self { unsafe { mem::transmute(bytes) } } diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index 1bac6d22d3744..2a38464d7c1ee 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -20,7 +20,7 @@ html_playground_url = "https://play.rust-lang.org/", test(attr(deny(warnings))))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] pub use self::Piece::*; pub use self::Position::*; diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 9fa48adebdf07..7acadc32048bd 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -288,7 +288,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(allow(unused_variables), deny(warnings))))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(str_escape)] use self::LabelText::*; diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index 14221f3d79e84..cf05e56e53c84 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -24,14 +24,13 @@ #![feature(core_intrinsics)] #![feature(libc)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(panic_runtime)] #![feature(staged_api)] #![feature(rustc_attrs)] // Rust's "try" function, but if we're aborting on panics we just call the // function as there's nothing else we need to do here. -#[cfg_attr(stage0, no_mangle)] #[rustc_std_internal_symbol] pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8), data: *mut u8, @@ -51,7 +50,6 @@ pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8), // which would break compat with XP. For now just use `intrinsics::abort` which // will kill us with an illegal instruction, which will do a good enough job for // now hopefully. -#[cfg_attr(stage0, no_mangle)] #[rustc_std_internal_symbol] pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 { abort(); diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs index 9c3fc76c307a6..cfe671c626bcf 100644 --- a/src/libpanic_unwind/lib.rs +++ b/src/libpanic_unwind/lib.rs @@ -34,7 +34,7 @@ #![feature(core_intrinsics)] #![feature(lang_items)] #![feature(libc)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(panic_unwind)] #![feature(raw)] #![feature(staged_api)] diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index d885f9b406f59..34a44bd142148 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -27,7 +27,7 @@ test(no_crate_inject, attr(deny(warnings))), test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_private)] #![feature(staged_api)] #![feature(lang_items)] diff --git a/src/libprofiler_builtins/lib.rs b/src/libprofiler_builtins/lib.rs index a85593253b100..8678330a5a09e 100644 --- a/src/libprofiler_builtins/lib.rs +++ b/src/libprofiler_builtins/lib.rs @@ -15,5 +15,5 @@ reason = "internal implementation detail of rustc right now", issue = "0")] #![allow(unused_features)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(staged_api)] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 2eaf1eebb394c..b8731e5bb03d5 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -42,16 +42,14 @@ #![feature(box_patterns)] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(min_const_fn))] +#![feature(min_const_fn)] #![feature(core_intrinsics)] #![feature(drain_filter)] #![cfg_attr(windows, feature(libc))] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(never_type)] #![feature(exhaustive_patterns)] #![feature(extern_types)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(non_exhaustive)] #![feature(proc_macro_internals)] #![feature(quote)] @@ -59,7 +57,6 @@ #![feature(refcell_replace_swap)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_attrs)] -#![cfg_attr(stage0, feature(attr_literals))] #![feature(slice_patterns)] #![feature(slice_sort_by_cached_key)] #![feature(specialization)] @@ -70,10 +67,9 @@ #![feature(step_trait)] #![feature(integer_atomics)] #![feature(test)] -#![cfg_attr(not(stage0), feature(impl_header_lifetime_elision))] +#![feature(impl_header_lifetime_elision)] #![feature(in_band_lifetimes)] #![feature(macro_at_most_once_rep)] -#![cfg_attr(stage0, feature(crate_in_paths))] #![feature(crate_visibility_modifier)] #![recursion_limit="512"] diff --git a/src/librustc/middle/region.rs b/src/librustc/middle/region.rs index 788fbcef17163..191fa0bc7c566 100644 --- a/src/librustc/middle/region.rs +++ b/src/librustc/middle/region.rs @@ -168,8 +168,6 @@ impl_stable_hash_for!(struct ::middle::region::FirstStatementIndex { private }); // compilation error if size of `ScopeData` is not the same as a `u32` #[allow(dead_code)] -// only works on stage 1 when the rustc_layout_scalar_valid_range attribute actually exists -#[cfg(not(stage0))] static ASSERT: () = [()][!(mem::size_of::() == 4) as usize]; impl Scope { diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 37ef408c6bdee..9195a426bee8f 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -829,10 +829,10 @@ impl<'a, 'gcx> HashStable> for TypeckTables<'gcx> { impl<'tcx> CommonTypes<'tcx> { fn new(interners: &CtxtInterners<'tcx>) -> CommonTypes<'tcx> { // Ensure our type representation does not grow - #[cfg(all(not(stage0), target_pointer_width = "64"))] + #[cfg(target_pointer_width = "64")] #[allow(dead_code)] static ASSERT_TY_KIND: () = [()][!(::std::mem::size_of::() <= 24) as usize]; - #[cfg(all(not(stage0), target_pointer_width = "64"))] + #[cfg(target_pointer_width = "64")] #[allow(dead_code)] static ASSERT_TYS: () = [()][!(::std::mem::size_of::() <= 32) as usize]; diff --git a/src/librustc_allocator/lib.rs b/src/librustc_allocator/lib.rs index 2a3404ee83034..a2017a4ed0ff9 100644 --- a/src/librustc_allocator/lib.rs +++ b/src/librustc_allocator/lib.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_private)] #[macro_use] extern crate log; diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs index d6e821d427d05..6ea722ba769c1 100644 --- a/src/librustc_apfloat/lib.rs +++ b/src/librustc_apfloat/lib.rs @@ -45,7 +45,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/")] #![forbid(unsafe_code)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(try_from)] // See librustc_cratesio_shim/Cargo.toml for a comment explaining this. #[allow(unused_extern_crates)] diff --git a/src/librustc_asan/lib.rs b/src/librustc_asan/lib.rs index b3ba86ad8a4b3..7b845e631ffa3 100644 --- a/src/librustc_asan/lib.rs +++ b/src/librustc_asan/lib.rs @@ -10,7 +10,7 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs index 16da8c8a3b8bf..049c4b2bd92d8 100644 --- a/src/librustc_borrowck/lib.rs +++ b/src/librustc_borrowck/lib.rs @@ -14,7 +14,7 @@ #![allow(non_camel_case_types)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(quote)] #![recursion_limit="256"] diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index 9cb233122c3d0..71d739222b60a 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -26,7 +26,7 @@ #![feature(in_band_lifetimes)] #![allow(unused_attributes)] #![feature(libc)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(quote)] #![feature(range_contains)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustc_codegen_utils/lib.rs b/src/librustc_codegen_utils/lib.rs index 635819e94e867..03b3b20a4e772 100644 --- a/src/librustc_codegen_utils/lib.rs +++ b/src/librustc_codegen_utils/lib.rs @@ -19,7 +19,7 @@ #![feature(box_patterns)] #![feature(box_syntax)] #![feature(custom_attribute)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![allow(unused_attributes)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustc_cratesio_shim/src/lib.rs b/src/librustc_cratesio_shim/src/lib.rs index 55dec45a09824..1fe70fa23b7a2 100644 --- a/src/librustc_cratesio_shim/src/lib.rs +++ b/src/librustc_cratesio_shim/src/lib.rs @@ -11,7 +11,7 @@ // See Cargo.toml for a comment explaining this crate. #![allow(unused_extern_crates)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] extern crate bitflags; extern crate log; diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 43ab386980626..c592a5eb1e043 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -27,8 +27,7 @@ #![feature(unsize)] #![feature(specialization)] #![feature(optin_builtin_traits)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(allow_internal_unstable)] #![feature(vec_resize_with)] diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 27176a821b4af..b97f5868079c4 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -20,7 +20,7 @@ #![feature(box_syntax)] #![cfg_attr(unix, feature(libc))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(option_replace)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 266aa32698168..12f1a43ed0533 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -16,7 +16,7 @@ #![allow(unused_attributes)] #![feature(range_contains)] #![cfg_attr(unix, feature(libc))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(optin_builtin_traits)] extern crate atty; diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs index acdcf2b459e92..d0897a9618276 100644 --- a/src/librustc_incremental/lib.rs +++ b/src/librustc_incremental/lib.rs @@ -14,7 +14,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(specialization)] #![recursion_limit="256"] diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 9e0471f59fbab..98d4c87dc3b5e 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -26,8 +26,7 @@ #![cfg_attr(test, feature(test))] #![feature(box_patterns)] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(macro_at_most_once_rep)] diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 387660473a887..1c48d84473921 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(static_nobundle)] #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librustc_lsan/lib.rs b/src/librustc_lsan/lib.rs index b3ba86ad8a4b3..7b845e631ffa3 100644 --- a/src/librustc_lsan/lib.rs +++ b/src/librustc_lsan/lib.rs @@ -10,7 +10,7 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 09a8bea0941b6..7008166b9035d 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -15,7 +15,7 @@ #![feature(box_patterns)] #![feature(libc)] #![feature(macro_at_most_once_rep)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(proc_macro_internals)] #![feature(proc_macro_quote)] #![feature(quote)] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index a2d70bc05c1d4..b3ef9eab8017d 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -25,12 +25,10 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![feature(core_intrinsics)] #![feature(const_fn)] #![feature(decl_macro)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(exhaustive_patterns)] #![feature(range_contains)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_attrs)] -#![cfg_attr(stage0, feature(attr_literals))] #![feature(never_type)] #![feature(specialization)] #![feature(try_trait)] diff --git a/src/librustc_msan/lib.rs b/src/librustc_msan/lib.rs index b3ba86ad8a4b3..7b845e631ffa3 100644 --- a/src/librustc_msan/lib.rs +++ b/src/librustc_msan/lib.rs @@ -10,7 +10,7 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs index d62cb00923f70..42ead92783d7a 100644 --- a/src/librustc_passes/lib.rs +++ b/src/librustc_passes/lib.rs @@ -18,7 +18,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_diagnostic_macros)] #[macro_use] diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs index fa7008be73a07..ca2628078178b 100644 --- a/src/librustc_platform_intrinsics/lib.rs +++ b/src/librustc_platform_intrinsics/lib.rs @@ -10,7 +10,7 @@ #![allow(nonstandard_style)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] pub struct Intrinsic { pub inputs: &'static [&'static Type], diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs index 67f53a67313f7..2cc3f1efcb5f4 100644 --- a/src/librustc_plugin/lib.rs +++ b/src/librustc_plugin/lib.rs @@ -64,7 +64,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_diagnostic_macros)] #[macro_use] extern crate syntax; diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index 1fe370b44c5bc..60679d6d4304e 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -12,7 +12,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_diagnostic_macros)] #![recursion_limit="256"] diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 5e3f747009911..a68c89deea5b6 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -13,7 +13,7 @@ html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(crate_visibility_modifier)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_diagnostic_macros)] #![feature(slice_sort_by_cached_key)] diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index f6045c7b2d2df..1148daef8e391 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -12,7 +12,7 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(custom_attribute)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![allow(unused_attributes)] #![recursion_limit="256"] diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index c198b19ce6160..93d61b80847ec 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -22,9 +22,8 @@ html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(min_const_fn))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(min_const_fn)] +#![feature(nll)] #![feature(slice_patterns)] #[macro_use] diff --git a/src/librustc_traits/lib.rs b/src/librustc_traits/lib.rs index a6618efebb310..733804fb9b052 100644 --- a/src/librustc_traits/lib.rs +++ b/src/librustc_traits/lib.rs @@ -11,11 +11,9 @@ //! New recursive solver modeled on Chalk's recursive solver. Most of //! the guts are broken up into modules; see the comments in those modules. -#![cfg_attr(stage0, feature(crate_in_paths))] #![feature(crate_visibility_modifier)] -#![cfg_attr(stage0, feature(extern_prelude))] #![feature(in_band_lifetimes)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![recursion_limit="256"] diff --git a/src/librustc_tsan/lib.rs b/src/librustc_tsan/lib.rs index b3ba86ad8a4b3..7b845e631ffa3 100644 --- a/src/librustc_tsan/lib.rs +++ b/src/librustc_tsan/lib.rs @@ -10,7 +10,7 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs index a00a9f8613b64..1f5998d8ca395 100644 --- a/src/librustc_typeck/lib.rs +++ b/src/librustc_typeck/lib.rs @@ -75,7 +75,7 @@ This API is completely unstable and subject to change. #![feature(box_syntax)] #![feature(crate_visibility_modifier)] #![feature(exhaustive_patterns)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(quote)] #![feature(refcell_replace_swap)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 2456a5ad14acc..406180c09e8e4 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -16,7 +16,7 @@ #![feature(rustc_private)] #![feature(box_patterns)] #![feature(box_syntax)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(set_stdio)] #![feature(slice_sort_by_cached_key)] #![feature(test)] diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 1f6ee3d867b17..98b48ef291857 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -24,7 +24,7 @@ Core encoding and decoding interfaces. #![feature(core_intrinsics)] #![feature(specialization)] #![feature(never_type)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![cfg_attr(test, feature(test))] pub use self::serialize::{Decoder, Encoder, Decodable, Encodable}; diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 6753ed4a3df6d..31fc9ed3f772d 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -151,14 +151,12 @@ pub mod __default_lib_allocator { // ABI #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rdl_alloc(size: usize, align: usize) -> *mut u8 { let layout = Layout::from_size_align_unchecked(size, align); System.alloc(layout) } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rdl_dealloc(ptr: *mut u8, size: usize, align: usize) { @@ -166,7 +164,6 @@ pub mod __default_lib_allocator { } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rdl_realloc(ptr: *mut u8, old_size: usize, align: usize, @@ -176,7 +173,6 @@ pub mod __default_lib_allocator { } #[rustc_std_internal_symbol] - #[cfg_attr(stage0, no_mangle)] pub unsafe extern fn __rdl_alloc_zeroed(size: usize, align: usize) -> *mut u8 { let layout = Layout::from_size_align_unchecked(size, align); System.alloc_zeroed(layout) diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 1eb76d6c45ec4..7ae4f2de4c36d 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -250,8 +250,7 @@ #![feature(cfg_target_vendor)] #![feature(char_error_internals)] #![feature(compiler_builtins_lib)] -#![cfg_attr(stage0, feature(const_fn))] -#![cfg_attr(not(stage0), feature(min_const_fn))] +#![feature(min_const_fn)] #![feature(const_int_ops)] #![feature(const_ip)] #![feature(core_intrinsics)] @@ -270,10 +269,9 @@ #![feature(libc)] #![feature(link_args)] #![feature(linkage)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(needs_panic_runtime)] #![feature(never_type)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(exhaustive_patterns)] #![feature(on_unimplemented)] #![feature(optin_builtin_traits)] @@ -286,7 +284,7 @@ #![feature(rustc_attrs)] #![feature(rustc_const_unstable)] #![feature(std_internals)] -#![feature(stdsimd)] +#![cfg_attr(not(stage0), feature(stdsimd))] #![feature(shrink_to)] #![feature(slice_concat_ext)] #![feature(slice_internals)] @@ -302,15 +300,12 @@ #![feature(unboxed_closures)] #![feature(untagged_unions)] #![feature(unwind_attributes)] -#![cfg_attr(stage0, feature(use_extern_macros))] #![feature(doc_cfg)] #![feature(doc_masked)] #![feature(doc_spotlight)] -#![cfg_attr(all(windows, stage0), feature(used))] #![feature(doc_alias)] #![feature(doc_keyword)] #![feature(panic_info_message)] -#![cfg_attr(stage0, feature(panic_implementation))] #![feature(non_exhaustive)] #![default_lib_allocator] diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index f79c986cc89e4..df085a7f450b0 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -319,8 +319,7 @@ pub fn panicking() -> bool { /// Entry point of panic from the libcore crate. #[cfg(not(test))] -#[cfg_attr(stage0, panic_implementation)] -#[cfg_attr(not(stage0), panic_handler)] +#[panic_handler] #[unwind(allowed)] pub fn rust_begin_panic(info: &PanicInfo) -> ! { continue_panic_fmt(&info) @@ -398,7 +397,7 @@ fn continue_panic_fmt(info: &PanicInfo) -> ! { #[unstable(feature = "libstd_sys_internals", reason = "used by the panic! macro", issue = "0")] -#[cfg_attr(not(any(stage0, test)), lang = "begin_panic")] +#[cfg_attr(not(test), lang = "begin_panic")] #[inline(never)] #[cold] // avoid code bloat at the call sites as much as possible pub fn begin_panic(msg: M, file_line_col: &(&'static str, u32, u32)) -> ! { // Note that this should be the only allocation performed in this code path. diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index a1b031a655f85..9077eca18215c 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -21,7 +21,7 @@ #![feature(crate_visibility_modifier)] #![feature(macro_at_most_once_rep)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(rustc_attrs)] #![feature(rustc_diagnostic_macros)] #![feature(slice_sort_by_cached_key)] diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs index 31089c9ff82ce..7c023fc5c9c22 100644 --- a/src/libsyntax_ext/lib.rs +++ b/src/libsyntax_ext/lib.rs @@ -16,7 +16,7 @@ #![feature(proc_macro_internals)] #![feature(decl_macro)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(str_escape)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index 67fd847a2ae91..45eaf1d3190f2 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -21,11 +21,11 @@ #![feature(const_fn)] #![feature(crate_visibility_modifier)] #![feature(custom_attribute)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(non_exhaustive)] #![feature(optin_builtin_traits)] #![feature(specialization)] -#![feature(stdsimd)] +#![cfg_attr(not(stage0), feature(stdsimd))] use std::borrow::Cow; use std::cell::Cell; diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index a49fd67639dbe..5ac46c2c5ebdc 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -50,7 +50,7 @@ #![cfg_attr(windows, feature(libc))] // Handle rustfmt skips #![feature(custom_attribute)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![allow(unused_attributes)] use std::io::prelude::*; diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index f6383c19cb5e6..0e862bcf5ca46 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -35,7 +35,7 @@ #![feature(asm)] #![feature(fnbox)] #![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(set_stdio)] #![feature(panic_unwind)] #![feature(staged_api)] diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs index 424a7e3d009ec..954eb9d6d03ba 100644 --- a/src/libunwind/lib.rs +++ b/src/libunwind/lib.rs @@ -13,7 +13,7 @@ #![feature(cfg_target_vendor)] #![feature(link_cfg)] -#![cfg_attr(not(stage0), feature(nll))] +#![feature(nll)] #![feature(staged_api)] #![feature(unwind_attributes)] #![feature(static_nobundle)] diff --git a/src/stage0.txt b/src/stage0.txt index 69e8140cdf19d..f0967d1ba8ae6 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -12,7 +12,7 @@ # source tarball for a stable release you'll likely see `1.x.0` for rustc and # `0.x.0` for Cargo where they were released on `date`. -date: 2018-09-11 +date: 2018-09-23 rustc: beta cargo: beta diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs index c965a3ed86c82..460e28fc794f0 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/lint_for_crate.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar, rustc_private)] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] #[macro_use] extern crate rustc; diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs index 082f15a39dd95..1057649d969d1 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/lint_group_plugin_test.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] // Load rustc as a plugin to get macros diff --git a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs index 315dad7eea515..b0183a3c56bc4 100644 --- a/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs +++ b/src/test/compile-fail-fulldeps/auxiliary/lint_plugin_test.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] extern crate syntax; diff --git a/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs b/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs index 601003827c6a2..00c419a8d09e8 100644 --- a/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs +++ b/src/test/run-pass-fulldeps/auxiliary/lint_for_crate.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar, rustc_private)] #![feature(box_syntax)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] #[macro_use] extern crate rustc; diff --git a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs index f525e0f082a44..e0acf340a79fd 100644 --- a/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs +++ b/src/test/run-pass-fulldeps/proc-macro/auxiliary/issue-40001-plugin.rs @@ -9,7 +9,6 @@ // except according to those terms. #![feature(box_syntax, plugin, plugin_registrar, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] #![crate_type = "dylib"] diff --git a/src/test/run-pass/macros/macro-first-set.rs b/src/test/run-pass/macros/macro-first-set.rs index 984a31d4d520e..c5f82ce5f0c06 100644 --- a/src/test/run-pass/macros/macro-first-set.rs +++ b/src/test/run-pass/macros/macro-first-set.rs @@ -9,7 +9,6 @@ // except according to those terms. // run-pass -#![cfg_attr(stage0, feature(macro_vis_matcher))] //{{{ issue 40569 ============================================================== diff --git a/src/test/run-pass/macros/macro-pub-matcher.rs b/src/test/run-pass/macros/macro-pub-matcher.rs index 7d8bb430232fe..8e68a3c00455f 100644 --- a/src/test/run-pass/macros/macro-pub-matcher.rs +++ b/src/test/run-pass/macros/macro-pub-matcher.rs @@ -10,7 +10,6 @@ // run-pass #![allow(dead_code, unused_imports)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(crate_visibility_modifier)] /** diff --git a/src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs b/src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs index 082f15a39dd95..1057649d969d1 100644 --- a/src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint_group_plugin_test.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] // Load rustc as a plugin to get macros diff --git a/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs b/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs index 315dad7eea515..b0183a3c56bc4 100644 --- a/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint_plugin_test.rs @@ -12,7 +12,6 @@ #![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] extern crate syntax; diff --git a/src/test/ui-fulldeps/auxiliary/lint_tool_test.rs b/src/test/ui-fulldeps/auxiliary/lint_tool_test.rs index e184c0919d0ec..7d2acd7aa4c86 100644 --- a/src/test/ui-fulldeps/auxiliary/lint_tool_test.rs +++ b/src/test/ui-fulldeps/auxiliary/lint_tool_test.rs @@ -10,7 +10,6 @@ #![feature(plugin_registrar)] #![feature(box_syntax, rustc_private)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![feature(macro_at_most_once_rep)] extern crate syntax; diff --git a/src/test/ui/issues/issue-42755.rs b/src/test/ui/issues/issue-42755.rs index 46c8cb740ded7..a8458ccacc3c0 100644 --- a/src/test/ui/issues/issue-42755.rs +++ b/src/test/ui/issues/issue-42755.rs @@ -8,7 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![cfg_attr(stage0, feature(macro_vis_matcher))] macro_rules! foo { ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree diff --git a/src/test/ui/issues/issue-42755.stderr b/src/test/ui/issues/issue-42755.stderr index fa736edc47f5b..bdbb99de4608f 100644 --- a/src/test/ui/issues/issue-42755.stderr +++ b/src/test/ui/issues/issue-42755.stderr @@ -1,5 +1,5 @@ error: repetition matches empty token tree - --> $DIR/issue-42755.rs:14:7 + --> $DIR/issue-42755.rs:13:7 | LL | ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree | ^^^^^^^^ diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.rs b/src/test/ui/lint/unreachable_pub-pub_crate.rs index 0089617b11c0b..b58bbe74c9731 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.rs +++ b/src/test/ui/lint/unreachable_pub-pub_crate.rs @@ -16,7 +16,6 @@ // compile-pass -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![allow(unused)] #![warn(unreachable_pub)] diff --git a/src/test/ui/lint/unreachable_pub-pub_crate.stderr b/src/test/ui/lint/unreachable_pub-pub_crate.stderr index 1cbfbd211255d..ed45ba8e85d46 100644 --- a/src/test/ui/lint/unreachable_pub-pub_crate.stderr +++ b/src/test/ui/lint/unreachable_pub-pub_crate.stderr @@ -1,5 +1,5 @@ warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:26:5 + --> $DIR/unreachable_pub-pub_crate.rs:25:5 | LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ @@ -7,14 +7,14 @@ LL | pub use std::fmt; | help: consider restricting its visibility: `pub(crate)` | note: lint level defined here - --> $DIR/unreachable_pub-pub_crate.rs:22:9 + --> $DIR/unreachable_pub-pub_crate.rs:21:9 | LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:27:24 + --> $DIR/unreachable_pub-pub_crate.rs:26:24 | LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced | --- ^^^^ @@ -24,7 +24,7 @@ LL | pub use std::env::{Args}; // braced-use has different item spans than u = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:29:5 + --> $DIR/unreachable_pub-pub_crate.rs:28:5 | LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ @@ -34,7 +34,7 @@ LL | pub struct Hydrogen { = help: or consider exporting it for use by other crates warning: unreachable `pub` field - --> $DIR/unreachable_pub-pub_crate.rs:31:9 + --> $DIR/unreachable_pub-pub_crate.rs:30:9 | LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ @@ -42,7 +42,7 @@ LL | pub neutrons: usize, | help: consider restricting its visibility: `pub(crate)` warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:37:9 + --> $DIR/unreachable_pub-pub_crate.rs:36:9 | LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | help: consider restricting its visibility: `pub(crate)` warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:41:5 + --> $DIR/unreachable_pub-pub_crate.rs:40:5 | LL | pub enum Helium {} | ---^^^^^^^^^^^^ @@ -60,7 +60,7 @@ LL | pub enum Helium {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:42:5 + --> $DIR/unreachable_pub-pub_crate.rs:41:5 | LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ @@ -70,7 +70,7 @@ LL | pub union Lithium { c1: usize, c2: u8 } = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:43:5 + --> $DIR/unreachable_pub-pub_crate.rs:42:5 | LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ @@ -80,7 +80,7 @@ LL | pub fn beryllium() {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:44:5 + --> $DIR/unreachable_pub-pub_crate.rs:43:5 | LL | pub trait Boron {} | ---^^^^^^^^^^^^ @@ -90,7 +90,7 @@ LL | pub trait Boron {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:45:5 + --> $DIR/unreachable_pub-pub_crate.rs:44:5 | LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -100,7 +100,7 @@ LL | pub const CARBON: usize = 1; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:46:5 + --> $DIR/unreachable_pub-pub_crate.rs:45:5 | LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,7 +110,7 @@ LL | pub static NITROGEN: usize = 2; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:47:5 + --> $DIR/unreachable_pub-pub_crate.rs:46:5 | LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ @@ -120,7 +120,7 @@ LL | pub type Oxygen = bool; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:50:47 + --> $DIR/unreachable_pub-pub_crate.rs:49:47 | LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub-pub_crate.rs:55:9 + --> $DIR/unreachable_pub-pub_crate.rs:54:9 | LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/test/ui/lint/unreachable_pub.rs b/src/test/ui/lint/unreachable_pub.rs index 7fd4a90109071..217e26e44047a 100644 --- a/src/test/ui/lint/unreachable_pub.rs +++ b/src/test/ui/lint/unreachable_pub.rs @@ -11,7 +11,6 @@ // compile-pass #![feature(crate_visibility_modifier)] -#![cfg_attr(stage0, feature(macro_vis_matcher))] #![allow(unused)] #![warn(unreachable_pub)] diff --git a/src/test/ui/lint/unreachable_pub.stderr b/src/test/ui/lint/unreachable_pub.stderr index 25046055aa024..e1d00d1371712 100644 --- a/src/test/ui/lint/unreachable_pub.stderr +++ b/src/test/ui/lint/unreachable_pub.stderr @@ -1,5 +1,5 @@ warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:21:5 + --> $DIR/unreachable_pub.rs:20:5 | LL | pub use std::fmt; | ---^^^^^^^^^^^^^^ @@ -7,14 +7,14 @@ LL | pub use std::fmt; | help: consider restricting its visibility: `crate` | note: lint level defined here - --> $DIR/unreachable_pub.rs:17:9 + --> $DIR/unreachable_pub.rs:16:9 | LL | #![warn(unreachable_pub)] | ^^^^^^^^^^^^^^^ = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:22:24 + --> $DIR/unreachable_pub.rs:21:24 | LL | pub use std::env::{Args}; // braced-use has different item spans than unbraced | --- ^^^^ @@ -24,7 +24,7 @@ LL | pub use std::env::{Args}; // braced-use has different item spans than u = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:24:5 + --> $DIR/unreachable_pub.rs:23:5 | LL | pub struct Hydrogen { | ---^^^^^^^^^^^^^^^^ @@ -34,7 +34,7 @@ LL | pub struct Hydrogen { = help: or consider exporting it for use by other crates warning: unreachable `pub` field - --> $DIR/unreachable_pub.rs:26:9 + --> $DIR/unreachable_pub.rs:25:9 | LL | pub neutrons: usize, | ---^^^^^^^^^^^^^^^^ @@ -42,7 +42,7 @@ LL | pub neutrons: usize, | help: consider restricting its visibility: `crate` warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:32:9 + --> $DIR/unreachable_pub.rs:31:9 | LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -50,7 +50,7 @@ LL | pub fn count_neutrons(&self) -> usize { self.neutrons } | help: consider restricting its visibility: `crate` warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:36:5 + --> $DIR/unreachable_pub.rs:35:5 | LL | pub enum Helium {} | ---^^^^^^^^^^^^ @@ -60,7 +60,7 @@ LL | pub enum Helium {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:37:5 + --> $DIR/unreachable_pub.rs:36:5 | LL | pub union Lithium { c1: usize, c2: u8 } | ---^^^^^^^^^^^^^^ @@ -70,7 +70,7 @@ LL | pub union Lithium { c1: usize, c2: u8 } = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:38:5 + --> $DIR/unreachable_pub.rs:37:5 | LL | pub fn beryllium() {} | ---^^^^^^^^^^^^^^^ @@ -80,7 +80,7 @@ LL | pub fn beryllium() {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:39:5 + --> $DIR/unreachable_pub.rs:38:5 | LL | pub trait Boron {} | ---^^^^^^^^^^^^ @@ -90,7 +90,7 @@ LL | pub trait Boron {} = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:40:5 + --> $DIR/unreachable_pub.rs:39:5 | LL | pub const CARBON: usize = 1; | ---^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -100,7 +100,7 @@ LL | pub const CARBON: usize = 1; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:41:5 + --> $DIR/unreachable_pub.rs:40:5 | LL | pub static NITROGEN: usize = 2; | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,7 +110,7 @@ LL | pub static NITROGEN: usize = 2; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:42:5 + --> $DIR/unreachable_pub.rs:41:5 | LL | pub type Oxygen = bool; | ---^^^^^^^^^^^^^^^^^^^^ @@ -120,7 +120,7 @@ LL | pub type Oxygen = bool; = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:45:47 + --> $DIR/unreachable_pub.rs:44:47 | LL | ($visibility: vis, $name: ident) => { $visibility struct $name {} } | ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -134,7 +134,7 @@ LL | define_empty_struct_with_visibility!(pub, Fluorine); = help: or consider exporting it for use by other crates warning: unreachable `pub` item - --> $DIR/unreachable_pub.rs:50:9 + --> $DIR/unreachable_pub.rs:49:9 | LL | pub fn catalyze() -> bool; | ---^^^^^^^^^^^^^^^^^^^^^^^