Bump bootstrap compiler to 1.33 beta

This commit is contained in:
Mark Rousskov 2019-01-19 16:25:06 -07:00
parent f95834b2a9
commit b7f030e114
19 changed files with 16 additions and 168 deletions

View File

@ -14,7 +14,7 @@ use crate::Build;
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<Info>,

View File

@ -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);

View File

@ -423,7 +423,7 @@ impl 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));

View File

@ -1,4 +1,3 @@
#![cfg_attr(stage0, feature(duration_as_u128))]
use std::{collections::VecDeque, time::Instant};
const VECDEQUE_LEN: i32 = 100000;

View File

@ -692,7 +692,6 @@ extern "rust-intrinsic" {
/// 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<T>();
/// Creates a value initialized to zero.

View File

@ -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)]

View File

@ -492,7 +492,6 @@ pub const fn needs_drop<T>() -> 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>() -> T {
#[cfg(not(stage0))]
intrinsics::panic_if_uninhabited::<T>();
intrinsics::init()
}
@ -626,7 +625,6 @@ pub unsafe fn zeroed<T>() -> 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>() -> T {
#[cfg(not(stage0))]
intrinsics::panic_if_uninhabited::<T>();
intrinsics::uninit()
}
@ -1132,7 +1130,6 @@ impl<T> MaybeUninit<T> {
#[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)]
pub unsafe fn into_inner(self) -> T {
#[cfg(not(stage0))]
intrinsics::panic_if_uninhabited::<T>();
ManuallyDrop::into_inner(self.value)
}

View File

@ -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?

View File

@ -281,7 +281,6 @@ $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 { (self as $UnsignedT).count_ones() }
}
@ -297,7 +296,6 @@ Basic usage:
", $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 @@ assert_eq!(n.leading_zeros(), 0);",
$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 @@ assert_eq!(n.trailing_zeros(), 2);",
$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 @@ let m = ", $rot_result, ";
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 @@ let m = ", $rot_op, ";
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 @@ let m = n.swap_bytes();
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 @@ if cfg!(target_endian = \"big\") {
$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 @@ if cfg!(target_endian = \"little\") {
$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 @@ if cfg!(target_endian = \"big\") {
$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 @@ if cfg!(target_endian = \"little\") {
$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 @@ assert_eq!(", stringify!($SelfT), "::max_value().wrapping_add(2), ", stringify!(
$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 @@ stringify!($SelfT), "::max_value());",
$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 @@ assert_eq!(11i8.wrapping_mul(12), -124);",
$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 @@ 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 {
@ -1246,7 +1216,6 @@ assert_eq!((-128i16).wrapping_shr(64), -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 {
@ -1343,14 +1312,8 @@ assert_eq!(", stringify!($SelfT), "::MAX.overflowing_add(1), (", stringify!($Sel
"::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 @@ assert_eq!(", stringify!($SelfT), "::MIN.overflowing_sub(1), (", stringify!($Sel
"::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 @@ assert_eq!(1_000_000_000i32.overflowing_mul(10), (1410065408, true));",
$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 @@ assert_eq!(0x1i32.overflowing_shl(36), (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)))
@ -1618,7 +1568,6 @@ assert_eq!(0x10i32.overflowing_shr(36), (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)))
@ -2242,13 +2191,9 @@ Basic usage:
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 @@ Basic usage:
", $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 @@ Basic usage:
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 @@ Basic usage:
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 @@ let m = ", $rot_result, ";
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 @@ let m = ", $rot_op, ";
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 @@ let m = n.swap_bytes();
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 @@ let m = n.reverse_bits();
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 @@ if cfg!(target_endian = \"big\") {
}", $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 @@ if cfg!(target_endian = \"little\") {
}", $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 @@ if cfg!(target_endian = \"big\") {
}", $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 @@ if cfg!(target_endian = \"little\") {
}", $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 @@ assert_eq!(200", stringify!($SelfT), ".wrapping_add(", stringify!($SelfT), "::ma
$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 @@ assert_eq!(100", stringify!($SelfT), ".wrapping_sub(", stringify!($SelfT), "::ma
$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 @@ $EndFeature, "
/// 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 @@ Basic usage:
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 @@ Basic usage:
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 @@ assert_eq!(5", stringify!($SelfT), ".overflowing_add(2), (7, false));
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 @@ assert_eq!(0", stringify!($SelfT), ".overflowing_sub(1), (", stringify!($SelfT),
$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 @@ $EndFeature, "
/// 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 @@ Basic usage
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 @@ Basic usage
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)))

View File

@ -171,7 +171,7 @@ impl<T: ?Sized> DerefMut for &mut T {
/// 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<T>`,
/// `Rc<T>`, `&T`, and `Pin<P>`.
#[cfg_attr(not(stage0), lang = "receiver")]
#[lang = "receiver"]
#[unstable(feature = "receiver_trait", issue = "0")]
#[doc(hidden)]
pub trait Receiver {

View File

@ -12,7 +12,6 @@
#![panic_runtime]
#![allow(unused_features)]
#![cfg_attr(stage0, feature(cfg_target_vendor))]
#![feature(core_intrinsics)]
#![feature(libc)]
#![feature(nll)]

View File

@ -24,10 +24,8 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![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"]

View File

@ -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)]

View File

@ -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 {

View File

@ -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)]

View File

@ -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)]

View File

@ -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

View File

@ -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<F: FnMut(&str, usize, &str)>(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<F: FnMut(&str, usize, &str)>(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..];

View File

@ -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,