From: Mark Rousskov Date: Sat, 19 Jan 2019 23:25:06 +0000 (-0700) Subject: Bump bootstrap compiler to 1.33 beta X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b7f030e114186890612872c89498cbc914c0220f;p=rust.git Bump bootstrap compiler to 1.33 beta --- diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index 63741b9b677..0b2f62485c9 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -14,7 +14,7 @@ use crate::config::Config; // The version number -pub const CFG_RELEASE_NUM: &str = "1.33.0"; +pub const CFG_RELEASE_NUM: &str = "1.34.0"; pub struct GitInfo { inner: Option, diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 98d2fb1e2d0..116b2720f39 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -226,7 +226,7 @@ fn make_win_dist( let trim_chars: &[_] = &[' ', '=']; let value = line[(idx + 1)..] - .trim_left_matches(trim_chars) + .trim_start_matches(trim_chars) .split(';') .map(PathBuf::from); diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index bddc6362389..7491385af79 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -423,7 +423,7 @@ pub fn new(config: Config) -> Build { Command::new(&build.initial_rustc).arg("--version").arg("--verbose")); let local_release = local_version_verbose .lines().filter(|x| x.starts_with("release:")) - .next().unwrap().trim_left_matches("release:").trim(); + .next().unwrap().trim_start_matches("release:").trim(); let my_version = channel::CFG_RELEASE_NUM; if local_release.split('.').take(2).eq(my_version.split('.').take(2)) { build.verbose(&format!("auto-detected local-rebuild {}", local_release)); diff --git a/src/liballoc/benches/vec_deque_append.rs b/src/liballoc/benches/vec_deque_append.rs index 2db8fbe1309..78ec91d9e3e 100644 --- a/src/liballoc/benches/vec_deque_append.rs +++ b/src/liballoc/benches/vec_deque_append.rs @@ -1,4 +1,3 @@ -#![cfg_attr(stage0, feature(duration_as_u128))] use std::{collections::VecDeque, time::Instant}; const VECDEQUE_LEN: i32 = 100000; diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index db19baf7a2c..e66a8465370 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -692,7 +692,6 @@ /// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited: /// This will statically either panic, or do nothing. - #[cfg(not(stage0))] pub fn panic_if_uninhabited(); /// Creates a value initialized to zero. diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index df32cfa3373..45ef7fe70a0 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -71,7 +71,6 @@ #![feature(cfg_target_has_atomic)] #![feature(concat_idents)] #![feature(const_fn)] -#![cfg_attr(stage0, feature(const_int_ops))] #![feature(const_fn_union)] #![feature(custom_attribute)] #![feature(doc_cfg)] @@ -112,19 +111,17 @@ #![feature(aarch64_target_feature)] #![feature(wasm_target_feature)] #![feature(avx512_target_feature)] -#![cfg_attr(not(stage0), feature(cmpxchg16b_target_feature))] +#![feature(cmpxchg16b_target_feature)] #![feature(const_slice_len)] #![feature(const_str_as_bytes)] #![feature(const_str_len)] -#![cfg_attr(stage0, feature(const_let))] -#![cfg_attr(stage0, feature(const_int_rotate))] #![feature(const_int_conversion)] #![feature(const_transmute)] #![feature(reverse_bits)] #![feature(non_exhaustive)] #![feature(structural_match)] #![feature(abi_unadjusted)] -#![cfg_attr(not(stage0), feature(adx_target_feature))] +#![feature(adx_target_feature)] #[prelude_import] #[allow(unused)] diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 8fcbb73d9ce..e661ea3f503 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -492,7 +492,6 @@ pub const fn needs_drop() -> bool { #[rustc_deprecated(since = "2.0.0", reason = "use `mem::MaybeUninit::zeroed` instead")] #[stable(feature = "rust1", since = "1.0.0")] pub unsafe fn zeroed() -> T { - #[cfg(not(stage0))] intrinsics::panic_if_uninhabited::(); intrinsics::init() } @@ -626,7 +625,6 @@ pub unsafe fn zeroed() -> T { #[rustc_deprecated(since = "2.0.0", reason = "use `mem::MaybeUninit::uninitialized` instead")] #[stable(feature = "rust1", since = "1.0.0")] pub unsafe fn uninitialized() -> T { - #[cfg(not(stage0))] intrinsics::panic_if_uninhabited::(); intrinsics::uninit() } @@ -1132,7 +1130,6 @@ pub fn set(&mut self, val: T) { #[unstable(feature = "maybe_uninit", issue = "53491")] #[inline(always)] pub unsafe fn into_inner(self) -> T { - #[cfg(not(stage0))] intrinsics::panic_if_uninhabited::(); ManuallyDrop::into_inner(self.value) } diff --git a/src/libcore/num/bignum.rs b/src/libcore/num/bignum.rs index 5326ef1e7c1..c3a42a0fc04 100644 --- a/src/libcore/num/bignum.rs +++ b/src/libcore/num/bignum.rs @@ -46,17 +46,6 @@ macro_rules! impl_full_ops { ($($ty:ty: add($addfn:path), mul/div($bigty:ident);)*) => ( $( impl FullOps for $ty { - #[cfg(stage0)] - fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) { - // This cannot overflow; the output is between `0` and `2 * 2^nbits - 1`. - // FIXME: will LLVM optimize this into ADC or similar? - let (v, carry1) = unsafe { intrinsics::add_with_overflow(self, other) }; - let (v, carry2) = unsafe { - intrinsics::add_with_overflow(v, if carry {1} else {0}) - }; - (carry1 || carry2, v) - } - #[cfg(not(stage0))] fn full_add(self, other: $ty, carry: bool) -> (bool, $ty) { // This cannot overflow; the output is between `0` and `2 * 2^nbits - 1`. // FIXME: will LLVM optimize this into ADC or similar? diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 423b800d585..7cf2317f4b3 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -281,7 +281,6 @@ pub fn from_str_radix(src: &str, radix: u32) -> Result { ``` "), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } } @@ -297,7 +296,6 @@ pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 1);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn count_zeros(self) -> u32 { (!self).count_ones() @@ -318,7 +316,6 @@ pub const fn count_zeros(self) -> u32 { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn leading_zeros(self) -> u32 { (self as $UnsignedT).leading_zeros() @@ -339,7 +336,6 @@ pub const fn leading_zeros(self) -> u32 { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn trailing_zeros(self) -> u32 { (self as $UnsignedT).trailing_zeros() @@ -363,7 +359,6 @@ pub const fn trailing_zeros(self) -> u32 { assert_eq!(n.rotate_left(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_rotate"))] #[inline] pub const fn rotate_left(self, n: u32) -> Self { (self as $UnsignedT).rotate_left(n) as Self @@ -388,7 +383,6 @@ pub const fn rotate_left(self, n: u32) -> Self { assert_eq!(n.rotate_right(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_rotate"))] #[inline] pub const fn rotate_right(self, n: u32) -> Self { (self as $UnsignedT).rotate_right(n) as Self @@ -410,7 +404,6 @@ pub const fn rotate_right(self, n: u32) -> Self { assert_eq!(m, ", $swapped, "); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn swap_bytes(self) -> Self { (self as $UnsignedT).swap_bytes() as Self @@ -460,7 +453,6 @@ pub const fn reverse_bits(self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn from_be(x: Self) -> Self { #[cfg(target_endian = "big")] @@ -494,7 +486,6 @@ pub const fn from_be(x: Self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn from_le(x: Self) -> Self { #[cfg(target_endian = "little")] @@ -528,7 +519,6 @@ pub const fn from_le(x: Self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn to_be(self) -> Self { // or not to be? #[cfg(target_endian = "big")] @@ -562,7 +552,6 @@ pub const fn to_be(self) -> Self { // or not to be? $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn to_le(self) -> Self { #[cfg(target_endian = "little")] @@ -998,14 +987,8 @@ pub fn saturating_pow(self, exp: u32) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_add(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_add(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_add(self, rhs) } } @@ -1025,14 +1008,8 @@ pub const fn wrapping_add(self, rhs: Self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_sub(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_sub(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_sub(self, rhs) } } @@ -1051,14 +1028,8 @@ pub const fn wrapping_sub(self, rhs: Self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_mul(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_mul(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_mul(self, rhs) } } @@ -1218,7 +1189,6 @@ pub fn wrapping_neg(self) -> Self { $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { @@ -1246,7 +1216,6 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self { $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { @@ -1343,14 +1312,8 @@ pub fn wrapping_pow(self, mut exp: u32) -> Self { "::MIN, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -1374,14 +1337,8 @@ pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { "::MAX, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -1403,14 +1360,8 @@ pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -1594,7 +1545,6 @@ pub fn overflowing_neg(self) -> (Self, bool) { $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) @@ -1618,7 +1568,6 @@ pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) @@ -2242,13 +2191,9 @@ pub fn from_str_radix(src: &str, radix: u32) -> Result { assert_eq!(n.count_ones(), 3);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn count_ones(self) -> u32 { - #[cfg(stage0)] - unsafe { intrinsics::ctpop(self as $ActualT) as u32 } - #[cfg(not(stage0))] - { intrinsics::ctpop(self as $ActualT) as u32 } + intrinsics::ctpop(self as $ActualT) as u32 } } @@ -2263,7 +2208,6 @@ pub const fn count_ones(self) -> u32 { ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 0);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn count_zeros(self) -> u32 { (!self).count_ones() @@ -2283,13 +2227,9 @@ pub const fn count_zeros(self) -> u32 { assert_eq!(n.leading_zeros(), 2);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn leading_zeros(self) -> u32 { - #[cfg(stage0)] - unsafe { intrinsics::ctlz(self as $ActualT) as u32 } - #[cfg(not(stage0))] - { intrinsics::ctlz(self as $ActualT) as u32 } + intrinsics::ctlz(self as $ActualT) as u32 } } @@ -2307,13 +2247,9 @@ pub const fn leading_zeros(self) -> u32 { assert_eq!(n.trailing_zeros(), 3);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn trailing_zeros(self) -> u32 { - #[cfg(stage0)] - unsafe { intrinsics::cttz(self) as u32 } - #[cfg(not(stage0))] - { intrinsics::cttz(self) as u32 } + intrinsics::cttz(self) as u32 } } @@ -2334,12 +2270,8 @@ pub const fn trailing_zeros(self) -> u32 { assert_eq!(n.rotate_left(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_rotate"))] #[inline] pub const fn rotate_left(self, n: u32) -> Self { - #[cfg(stage0)] - unsafe { intrinsics::rotate_left(self, n as $SelfT) } - #[cfg(not(stage0))] intrinsics::rotate_left(self, n as $SelfT) } } @@ -2362,12 +2294,8 @@ pub const fn rotate_left(self, n: u32) -> Self { assert_eq!(n.rotate_right(", $rot, "), m); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_rotate"))] #[inline] pub const fn rotate_right(self, n: u32) -> Self { - #[cfg(stage0)] - unsafe { intrinsics::rotate_right(self, n as $SelfT) } - #[cfg(not(stage0))] intrinsics::rotate_right(self, n as $SelfT) } } @@ -2387,13 +2315,9 @@ pub const fn rotate_right(self, n: u32) -> Self { assert_eq!(m, ", $swapped, "); ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn swap_bytes(self) -> Self { - #[cfg(stage0)] - unsafe { intrinsics::bswap(self as $ActualT) as Self } - #[cfg(not(stage0))] - { intrinsics::bswap(self as $ActualT) as Self } + intrinsics::bswap(self as $ActualT) as Self } } @@ -2413,13 +2337,9 @@ pub const fn swap_bytes(self) -> Self { assert_eq!(m, ", $reversed, "); ```"), #[unstable(feature = "reverse_bits", issue = "48763")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_conversion"))] #[inline] pub const fn reverse_bits(self) -> Self { - #[cfg(stage0)] - unsafe { intrinsics::bitreverse(self as $ActualT) as Self } - #[cfg(not(stage0))] - { intrinsics::bitreverse(self as $ActualT) as Self } + intrinsics::bitreverse(self as $ActualT) as Self } } @@ -2443,7 +2363,6 @@ pub const fn reverse_bits(self) -> Self { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn from_be(x: Self) -> Self { #[cfg(target_endian = "big")] @@ -2477,7 +2396,6 @@ pub const fn from_be(x: Self) -> Self { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn from_le(x: Self) -> Self { #[cfg(target_endian = "little")] @@ -2511,7 +2429,6 @@ pub const fn from_le(x: Self) -> Self { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn to_be(self) -> Self { // or not to be? #[cfg(target_endian = "big")] @@ -2545,7 +2462,6 @@ pub const fn to_be(self) -> Self { // or not to be? }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_ops"))] #[inline] pub const fn to_le(self) -> Self { #[cfg(target_endian = "little")] @@ -2918,14 +2834,8 @@ pub fn saturating_pow(self, exp: u32) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_add(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_add(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_add(self, rhs) } } @@ -2944,14 +2854,8 @@ pub const fn wrapping_add(self, rhs: Self) -> Self { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_sub(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_sub(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_sub(self, rhs) } } @@ -2971,14 +2875,8 @@ pub const fn wrapping_sub(self, rhs: Self) -> Self { /// assert_eq!(25u8.wrapping_mul(12), 44); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_mul(self, rhs: Self) -> Self { - #[cfg(stage0)] - unsafe { - intrinsics::overflowing_mul(self, rhs) - } - #[cfg(not(stage0))] intrinsics::overflowing_mul(self, rhs) } @@ -3124,7 +3022,6 @@ pub fn wrapping_neg(self) -> Self { assert_eq!(1", stringify!($SelfT), ".wrapping_shl(128), 1);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_shl(self, rhs: u32) -> Self { unsafe { @@ -3154,7 +3051,6 @@ pub const fn wrapping_shl(self, rhs: u32) -> Self { assert_eq!(128", stringify!($SelfT), ".wrapping_shr(128), 128);", $EndFeature, " ```"), #[stable(feature = "num_wrapping", since = "1.2.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_wrapping"))] #[inline] pub const fn wrapping_shr(self, rhs: u32) -> Self { unsafe { @@ -3218,14 +3114,8 @@ pub fn wrapping_pow(self, mut exp: u32) -> Self { assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (0, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::add_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -3250,14 +3140,8 @@ pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) { $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::sub_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -3281,14 +3165,8 @@ pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) { /// assert_eq!(1_000_000_000u32.overflowing_mul(10), (1410065408, true)); /// ``` #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - #[cfg(stage0)] - let (a, b) = unsafe { - intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT) - }; - #[cfg(not(stage0))] let (a, b) = intrinsics::mul_with_overflow(self as $ActualT, rhs as $ActualT); (a as Self, b) } @@ -3447,7 +3325,6 @@ pub fn overflowing_neg(self) -> (Self, bool) { assert_eq!(0x1", stringify!($SelfT), ".overflowing_shl(132), (0x10, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { (self.wrapping_shl(rhs), (rhs > ($BITS - 1))) @@ -3472,7 +3349,6 @@ pub const fn overflowing_shl(self, rhs: u32) -> (Self, bool) { assert_eq!(0x10", stringify!($SelfT), ".overflowing_shr(132), (0x1, true));", $EndFeature, " ```"), #[stable(feature = "wrapping", since = "1.7.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_int_overflowing"))] #[inline] pub const fn overflowing_shr(self, rhs: u32) -> (Self, bool) { (self.wrapping_shr(rhs), (rhs > ($BITS - 1))) diff --git a/src/libcore/ops/deref.rs b/src/libcore/ops/deref.rs index 075c3a084f4..42bb5cabb48 100644 --- a/src/libcore/ops/deref.rs +++ b/src/libcore/ops/deref.rs @@ -171,7 +171,7 @@ fn deref_mut(&mut self) -> &mut T { *self } /// Indicates that a struct can be used as a method receiver, without the /// `arbitrary_self_types` feature. This is implemented by stdlib pointer types like `Box`, /// `Rc`, `&T`, and `Pin

`. -#[cfg_attr(not(stage0), lang = "receiver")] +#[lang = "receiver"] #[unstable(feature = "receiver_trait", issue = "0")] #[doc(hidden)] pub trait Receiver { diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs index 8832a16d4ca..f6306d23c30 100644 --- a/src/libpanic_abort/lib.rs +++ b/src/libpanic_abort/lib.rs @@ -12,7 +12,6 @@ #![panic_runtime] #![allow(unused_features)] -#![cfg_attr(stage0, feature(cfg_target_vendor))] #![feature(core_intrinsics)] #![feature(libc)] #![feature(nll)] diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index 9395da60b38..ccfc15bac04 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -24,10 +24,8 @@ #![feature(unicode_internals)] #![feature(step_trait)] #![feature(slice_concat_ext)] -#![cfg_attr(stage0, feature(if_while_or_patterns))] #![feature(try_from)] #![feature(reverse_bits)] -#![cfg_attr(stage0, feature(underscore_imports))] #![recursion_limit="256"] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 82f3463dba0..c94a33da037 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -234,12 +234,9 @@ #![feature(c_variadic)] #![feature(cfg_target_has_atomic)] #![feature(cfg_target_thread_local)] -#![cfg_attr(stage0, feature(cfg_target_vendor))] #![feature(char_error_internals)] #![feature(compiler_builtins_lib)] #![feature(concat_idents)] -#![cfg_attr(stage0, feature(const_int_ops))] -#![cfg_attr(stage0, feature(const_ip))] #![feature(const_raw_ptr_deref)] #![feature(const_cstr_unchecked)] #![feature(core_intrinsics)] diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index f98113e0896..f45cd8b8c10 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -328,7 +328,6 @@ impl Ipv4Addr { /// let addr = Ipv4Addr::new(127, 0, 0, 1); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[cfg_attr(stage0, rustc_const_unstable(feature = "const_ip"))] pub const fn new(a: u8, b: u8, c: u8, d: u8) -> Ipv4Addr { Ipv4Addr { inner: c::in_addr { diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 2cc80ddea2d..7547814129d 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -23,7 +23,6 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", test(attr(deny(warnings))))] #![feature(asm)] -#![cfg_attr(stage0, feature(cfg_target_vendor))] #![feature(fnbox)] #![cfg_attr(any(unix, target_os = "cloudabi"), feature(libc))] #![feature(nll)] diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs index 7ed7837268d..5f9c82431b7 100644 --- a/src/libunwind/lib.rs +++ b/src/libunwind/lib.rs @@ -1,7 +1,6 @@ #![no_std] #![unstable(feature = "panic_unwind", issue = "32837")] -#![cfg_attr(stage0, feature(cfg_target_vendor))] #![feature(link_cfg)] #![feature(nll)] #![feature(staged_api)] diff --git a/src/stage0.txt b/src/stage0.txt index 2e376ed1ced..36d30b7d273 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: 2019-01-04 +date: 2019-01-18 rustc: beta cargo: beta diff --git a/src/tools/linkchecker/main.rs b/src/tools/linkchecker/main.rs index 59662be349d..2cf0fcfd34c 100644 --- a/src/tools/linkchecker/main.rs +++ b/src/tools/linkchecker/main.rs @@ -78,7 +78,7 @@ impl FileEntry { fn parse_ids(&mut self, file: &Path, contents: &str, errors: &mut bool) { if self.ids.is_empty() { with_attrs_in_source(contents, " id", |fragment, i, _| { - let frag = fragment.trim_left_matches("#").to_owned(); + let frag = fragment.trim_start_matches("#").to_owned(); let encoded = small_url_encode(&frag); if !self.ids.insert(frag) { *errors = true; @@ -343,7 +343,7 @@ fn with_attrs_in_source(contents: &str, attr: &str, Some(i) => i, None => continue, }; - if rest[..pos_equals].trim_left_matches(" ") != "" { + if rest[..pos_equals].trim_start_matches(" ") != "" { continue; } @@ -355,7 +355,7 @@ fn with_attrs_in_source(contents: &str, attr: &str, }; let quote_delim = rest.as_bytes()[pos_quote] as char; - if rest[..pos_quote].trim_left_matches(" ") != "" { + if rest[..pos_quote].trim_start_matches(" ") != "" { continue; } let rest = &rest[pos_quote + 1..]; diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 16f2e3ba27d..7126c0c2f6e 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -188,7 +188,7 @@ pub fn collect_lang_features(base_src_path: &Path, bad: &mut bool) -> Features { } let mut parts = line.split(','); - let level = match parts.next().map(|l| l.trim().trim_left_matches('(')) { + let level = match parts.next().map(|l| l.trim().trim_start_matches('(')) { Some("active") => Status::Unstable, Some("removed") => Status::Removed, Some("accepted") => Status::Stable,