From ad97f8b491422d947c1c97d8e9f1bfecdb7f47ba Mon Sep 17 00:00:00 2001 From: Mark Simulacrum Date: Fri, 22 Jun 2018 09:48:43 -0600 Subject: [PATCH 1/2] Bootstrap from 1.28.0-beta.3 --- src/Cargo.lock | 29 ++--- src/bootstrap/channel.rs | 2 +- src/liballoc/lib.rs | 1 - src/libcore/intrinsics.rs | 4 - src/libcore/lib.rs | 1 - src/libcore/num/mod.rs | 192 ------------------------------ src/libcore/num/wrapping.rs | 1 - src/libcore/panic.rs | 2 +- src/libcore/panicking.rs | 15 --- src/libcore/ptr.rs | 27 ----- src/libcore/slice/mod.rs | 3 - src/librustc/lib.rs | 1 - src/librustc_asan/lib.rs | 1 - src/librustc_lsan/lib.rs | 1 - src/librustc_metadata/lib.rs | 1 - src/librustc_msan/lib.rs | 1 - src/librustc_save_analysis/lib.rs | 1 - src/librustc_tsan/lib.rs | 1 - src/libstd/lib.rs | 5 +- src/libstd/panicking.rs | 100 +++++----------- src/stage0.txt | 2 +- src/tools/cargo | 2 +- src/tools/rust-installer | 2 +- 23 files changed, 53 insertions(+), 342 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index a93390552641c..5d09507c41bf1 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -191,13 +191,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cargo" -version = "0.29.0" +version = "0.30.0" dependencies = [ "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crates-io 0.17.0", + "crates-io 0.18.0", "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "curl 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", @@ -232,6 +232,7 @@ dependencies = [ "tempfile 3.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -299,7 +300,7 @@ dependencies = [ "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -472,7 +473,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "crates-io" -version = "0.17.0" +version = "0.18.0" dependencies = [ "curl 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1683,7 +1684,7 @@ dependencies = [ name = "rls" version = "0.128.0" dependencies = [ - "cargo 0.29.0", + "cargo 0.30.0", "cargo_metadata 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "clippy_lints 0.0.205 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1882,7 +1883,7 @@ dependencies = [ "rustc-ap-serialize 149.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-syntax_pos 149.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1895,7 +1896,7 @@ dependencies = [ "rustc-ap-serialize 164.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-syntax_pos 164.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1969,7 +1970,7 @@ dependencies = [ "rustc-ap-rustc_data_structures 149.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-serialize 149.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1981,7 +1982,7 @@ dependencies = [ "rustc-ap-rustc_data_structures 164.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-ap-serialize 164.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2192,7 +2193,7 @@ dependencies = [ "serialize 0.0.0", "syntax_pos 0.0.0", "termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2783,7 +2784,7 @@ dependencies = [ "rustc_data_structures 0.0.0", "scoped-tls 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2908,7 +2909,7 @@ name = "textwrap" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2984,7 +2985,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-width" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -3388,7 +3389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" +"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index a2495f68c1fa3..04d576df95546 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.28.0"; +pub const CFG_RELEASE_NUM: &str = "1.29.0"; pub struct GitInfo { inner: Option, diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index ec9b5eba56106..42fc716bae26c 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -105,7 +105,6 @@ #![feature(pin)] #![feature(ptr_internals)] #![feature(ptr_offset_from)] -#![cfg_attr(stage0, feature(repr_transparent))] #![feature(rustc_attrs)] #![feature(specialization)] #![feature(split_ascii_whitespace)] diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 95f13daf841ee..89fe2d941a350 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -1364,10 +1364,6 @@ extern "rust-intrinsic" { /// source as well as std's catch implementation. pub fn try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32; - #[cfg(stage0)] - /// docs my friends, its friday! - pub fn align_offset(ptr: *const (), align: usize) -> usize; - /// Emits a `!nontemporal` store according to LLVM (see their docs). /// Probably will never become stable. pub fn nontemporal_store(ptr: *mut T, val: T); diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 40caee855410e..cef126f36e8cf 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -100,7 +100,6 @@ #![feature(optin_builtin_traits)] #![feature(prelude_import)] #![feature(repr_simd, platform_intrinsics)] -#![cfg_attr(stage0, feature(repr_transparent))] #![feature(rustc_attrs)] #![feature(rustc_const_unstable)] #![feature(simd_ffi)] diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7e2dd304d7f5a..e0d267a6ce0ec 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -267,20 +267,11 @@ $EndFeature, " ``` "), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn count_ones(self) -> u32 { (self as $UnsignedT).count_ones() } - } - doc_comment! { concat!("Returns the number of zeros in the binary representation of `self`. @@ -292,7 +283,6 @@ Basic usage: ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 1);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn count_zeros(self) -> u32 { @@ -300,16 +290,6 @@ Basic usage: } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentatio"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn count_zeros(self) -> u32 { - (!self).count_ones() - } - } - doc_comment! { concat!("Returns the number of leading zeros in the binary representation of `self`. @@ -324,7 +304,6 @@ assert_eq!(n.leading_zeros(), 0);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn leading_zeros(self) -> u32 { @@ -332,16 +311,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn leading_zeros(self) -> u32 { - (self as $UnsignedT).leading_zeros() - } - } - doc_comment! { concat!("Returns the number of trailing zeros in the binary representation of `self`. @@ -356,7 +325,6 @@ assert_eq!(n.trailing_zeros(), 2);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn trailing_zeros(self) -> u32 { @@ -364,16 +332,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn trailing_zeros(self) -> u32 { - (self as $UnsignedT).trailing_zeros() - } - } - /// Shifts the bits to the left by a specified amount, `n`, /// wrapping the truncated bits to the end of the resulting integer. /// @@ -442,21 +400,12 @@ $EndFeature, " /// assert_eq!(m, 21760); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn swap_bytes(self) -> Self { (self as $UnsignedT).swap_bytes() as Self } - /// Dummy docs. See !stage0 documentation. - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn swap_bytes(self) -> Self { - (self as $UnsignedT).swap_bytes() as Self - } - /// Reverses the bit pattern of the integer. /// /// # Examples @@ -503,7 +452,6 @@ if cfg!(target_endian = \"big\") { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn from_be(x: Self) -> Self { @@ -518,16 +466,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn from_be(x: Self) -> Self { - if cfg!(target_endian = "big") { x } else { x.swap_bytes() } - } - } - doc_comment! { concat!("Converts an integer from little endian to the target's endianness. @@ -548,7 +486,6 @@ if cfg!(target_endian = \"little\") { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn from_le(x: Self) -> Self { @@ -563,16 +500,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn from_le(x: Self) -> Self { - if cfg!(target_endian = "little") { x } else { x.swap_bytes() } - } - } - doc_comment! { concat!("Converts `self` to big endian from the target's endianness. @@ -593,7 +520,6 @@ if cfg!(target_endian = \"big\") { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn to_be(self) -> Self { // or not to be? @@ -608,16 +534,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn to_be(self) -> Self { // or not to be? - if cfg!(target_endian = "big") { self } else { self.swap_bytes() } - } - } - doc_comment! { concat!("Converts `self` to little endian from the target's endianness. @@ -638,7 +554,6 @@ if cfg!(target_endian = \"little\") { $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn to_le(self) -> Self { @@ -653,16 +568,6 @@ $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn to_le(self) -> Self { - if cfg!(target_endian = "little") { self } else { self.swap_bytes() } - } - } - doc_comment! { concat!("Checked integer addition. Computes `self + rhs`, returning `None` if overflow occurred. @@ -2161,7 +2066,6 @@ Basic usage: assert_eq!(n.count_ones(), 3);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn count_ones(self) -> u32 { @@ -2169,16 +2073,6 @@ assert_eq!(n.count_ones(), 3);", $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn count_ones(self) -> u32 { - unsafe { intrinsics::ctpop(self as $ActualT) as u32 } - } - } - doc_comment! { concat!("Returns the number of zeros in the binary representation of `self`. @@ -2190,7 +2084,6 @@ Basic usage: ", $Feature, "assert_eq!(", stringify!($SelfT), "::max_value().count_zeros(), 0);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn count_zeros(self) -> u32 { @@ -2198,16 +2091,6 @@ Basic usage: } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn count_zeros(self) -> u32 { - (!self).count_ones() - } - } - doc_comment! { concat!("Returns the number of leading zeros in the binary representation of `self`. @@ -2221,7 +2104,6 @@ Basic usage: assert_eq!(n.leading_zeros(), 2);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn leading_zeros(self) -> u32 { @@ -2229,16 +2111,6 @@ assert_eq!(n.leading_zeros(), 2);", $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn leading_zeros(self) -> u32 { - unsafe { intrinsics::ctlz(self as $ActualT) as u32 } - } - } - doc_comment! { concat!("Returns the number of trailing zeros in the binary representation of `self`. @@ -2253,7 +2125,6 @@ Basic usage: assert_eq!(n.trailing_zeros(), 3);", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn trailing_zeros(self) -> u32 { @@ -2261,16 +2132,6 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, " } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn trailing_zeros(self) -> u32 { - unsafe { uint_cttz_call!(self, $BITS) as u32 } - } - } - /// Shifts the bits to the left by a specified amount, `n`, /// wrapping the truncated bits to the end of the resulting integer. /// @@ -2343,21 +2204,12 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, " /// assert_eq!(m, 21760); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn swap_bytes(self) -> Self { unsafe { intrinsics::bswap(self as $ActualT) as Self } } - /// Dummy docs. See !stage0 documentation. - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn swap_bytes(self) -> Self { - unsafe { intrinsics::bswap(self as $ActualT) as Self } - } - /// Reverses the bit pattern of the integer. /// /// # Examples @@ -2404,7 +2256,6 @@ if cfg!(target_endian = \"big\") { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn from_be(x: Self) -> Self { @@ -2419,16 +2270,6 @@ if cfg!(target_endian = \"big\") { } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn from_be(x: Self) -> Self { - if cfg!(target_endian = "big") { x } else { x.swap_bytes() } - } - } - doc_comment! { concat!("Converts an integer from little endian to the target's endianness. @@ -2449,7 +2290,6 @@ if cfg!(target_endian = \"little\") { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn from_le(x: Self) -> Self { @@ -2464,16 +2304,6 @@ if cfg!(target_endian = \"little\") { } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn from_le(x: Self) -> Self { - if cfg!(target_endian = "little") { x } else { x.swap_bytes() } - } - } - doc_comment! { concat!("Converts `self` to big endian from the target's endianness. @@ -2494,7 +2324,6 @@ if cfg!(target_endian = \"big\") { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn to_be(self) -> Self { // or not to be? @@ -2509,16 +2338,6 @@ if cfg!(target_endian = \"big\") { } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn to_be(self) -> Self { // or not to be? - if cfg!(target_endian = "big") { self } else { self.swap_bytes() } - } - } - doc_comment! { concat!("Converts `self` to little endian from the target's endianness. @@ -2539,7 +2358,6 @@ if cfg!(target_endian = \"little\") { }", $EndFeature, " ```"), #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(not(stage0))] #[rustc_const_unstable(feature = "const_int_ops")] #[inline] pub const fn to_le(self) -> Self { @@ -2554,16 +2372,6 @@ if cfg!(target_endian = \"little\") { } } - doc_comment! { - concat!("Dummy docs. See !stage0 documentation"), - #[stable(feature = "rust1", since = "1.0.0")] - #[cfg(stage0)] - #[inline] - pub fn to_le(self) -> Self { - if cfg!(target_endian = "little") { self } else { self.swap_bytes() } - } - } - doc_comment! { concat!("Checked integer addition. Computes `self + rhs`, returning `None` if overflow occurred. diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index d7f87d37f5b33..1c826c2fa76bd 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -531,7 +531,6 @@ assert_eq!(n.trailing_zeros(), 3); /// assert_eq!(m, Wrapping(-22016)); /// ``` #[unstable(feature = "reverse_bits", issue = "48763")] - #[cfg(not(stage0))] #[inline] pub fn reverse_bits(self) -> Self { Wrapping(self.0.reverse_bits()) diff --git a/src/libcore/panic.rs b/src/libcore/panic.rs index 37ae05309af1d..1b4129b99fc53 100644 --- a/src/libcore/panic.rs +++ b/src/libcore/panic.rs @@ -35,7 +35,7 @@ use fmt; /// /// panic!("Normal panic"); /// ``` -#[cfg_attr(not(stage0), lang = "panic_info")] +#[lang = "panic_info"] #[stable(feature = "panic_hooks", since = "1.10.0")] #[derive(Debug)] pub struct PanicInfo<'a> { diff --git a/src/libcore/panicking.rs b/src/libcore/panicking.rs index 0d4f8d1141e73..58407de9566e9 100644 --- a/src/libcore/panicking.rs +++ b/src/libcore/panicking.rs @@ -37,7 +37,6 @@ issue = "0")] use fmt; -#[cfg(not(stage0))] use panic::{Location, PanicInfo}; #[cold] #[inline(never)] // this is the slow path, always @@ -61,20 +60,6 @@ fn panic_bounds_check(file_line_col: &(&'static str, u32, u32), len, index), file_line_col) } -#[cfg(stage0)] -#[cold] #[inline(never)] -pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! { - #[allow(improper_ctypes)] - extern { - #[lang = "panic_fmt"] - #[unwind(allowed)] - fn panic_impl(fmt: fmt::Arguments, file: &'static str, line: u32, col: u32) -> !; - } - let (file, line, col) = *file_line_col; - unsafe { panic_impl(fmt, file, line, col) } -} - -#[cfg(not(stage0))] #[cold] #[inline(never)] pub fn panic_fmt(fmt: fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! { // NOTE This function never crosses the FFI boundary; it's a Rust-to-Rust call diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 81a8b3ef0474d..164b29d35159b 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -1243,7 +1243,6 @@ impl *const T { /// # } } /// ``` #[unstable(feature = "align_offset", issue = "44488")] - #[cfg(not(stage0))] pub fn align_offset(self, align: usize) -> usize where T: Sized { if !align.is_power_of_two() { panic!("align_offset: align is not a power-of-two"); @@ -1252,18 +1251,6 @@ impl *const T { align_offset(self, align) } } - - /// definitely docs. - #[unstable(feature = "align_offset", issue = "44488")] - #[cfg(stage0)] - pub fn align_offset(self, align: usize) -> usize where T: Sized { - if !align.is_power_of_two() { - panic!("align_offset: align is not a power-of-two"); - } - unsafe { - intrinsics::align_offset(self as *const (), align) - } - } } @@ -2308,7 +2295,6 @@ impl *mut T { /// # } } /// ``` #[unstable(feature = "align_offset", issue = "44488")] - #[cfg(not(stage0))] pub fn align_offset(self, align: usize) -> usize where T: Sized { if !align.is_power_of_two() { panic!("align_offset: align is not a power-of-two"); @@ -2317,18 +2303,6 @@ impl *mut T { align_offset(self, align) } } - - /// definitely docs. - #[unstable(feature = "align_offset", issue = "44488")] - #[cfg(stage0)] - pub fn align_offset(self, align: usize) -> usize where T: Sized { - if !align.is_power_of_two() { - panic!("align_offset: align is not a power-of-two"); - } - unsafe { - intrinsics::align_offset(self as *const (), align) - } - } } /// Align pointer `p`. @@ -2346,7 +2320,6 @@ impl *mut T { /// /// Any questions go to @nagisa. #[lang="align_offset"] -#[cfg(not(stage0))] pub(crate) unsafe fn align_offset(p: *const T, a: usize) -> usize { /// Calculate multiplicative modular inverse of `x` modulo `m`. /// diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs index e74e527927d7b..bcac9322ae80c 100644 --- a/src/libcore/slice/mod.rs +++ b/src/libcore/slice/mod.rs @@ -1708,7 +1708,6 @@ impl [T] { } /// Function to calculate lenghts of the middle and trailing slice for `align_to{,_mut}`. - #[cfg(not(stage0))] fn align_to_offsets(&self) -> (usize, usize) { // What we gonna do about `rest` is figure out what multiple of `U`s we can put in a // lowest number of `T`s. And how many `T`s we need for each such "multiple". @@ -1798,7 +1797,6 @@ impl [T] { /// } /// ``` #[unstable(feature = "slice_align_to", issue = "44488")] - #[cfg(not(stage0))] pub unsafe fn align_to(&self) -> (&[T], &[U], &[T]) { // Note that most of this function will be constant-evaluated, if ::mem::size_of::() == 0 || ::mem::size_of::() == 0 { @@ -1851,7 +1849,6 @@ impl [T] { /// } /// ``` #[unstable(feature = "slice_align_to", issue = "44488")] - #[cfg(not(stage0))] pub unsafe fn align_to_mut(&mut self) -> (&mut [T], &mut [U], &mut [T]) { // Note that most of this function will be constant-evaluated, if ::mem::size_of::() == 0 || ::mem::size_of::() == 0 { diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 102efe2bef3f7..95e2d0e2edbb5 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -49,7 +49,6 @@ #![feature(fs_read_write)] #![feature(iterator_find_map)] #![cfg_attr(windows, feature(libc))] -#![cfg_attr(stage0, feature(macro_lifetime_matcher))] #![feature(macro_vis_matcher)] #![feature(never_type)] #![feature(exhaustive_patterns)] diff --git a/src/librustc_asan/lib.rs b/src/librustc_asan/lib.rs index a7aeed7630959..0c78fd74a234e 100644 --- a/src/librustc_asan/lib.rs +++ b/src/librustc_asan/lib.rs @@ -10,7 +10,6 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(stage0, feature(global_allocator))] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_lsan/lib.rs b/src/librustc_lsan/lib.rs index a7aeed7630959..0c78fd74a234e 100644 --- a/src/librustc_lsan/lib.rs +++ b/src/librustc_lsan/lib.rs @@ -10,7 +10,6 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(stage0, feature(global_allocator))] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 0fbedcaff6ee8..dad1030cb610b 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -16,7 +16,6 @@ #![feature(fs_read_write)] #![feature(libc)] #![feature(macro_at_most_once_rep)] -#![cfg_attr(stage0, feature(macro_lifetime_matcher))] #![feature(proc_macro_internals)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] diff --git a/src/librustc_msan/lib.rs b/src/librustc_msan/lib.rs index a7aeed7630959..0c78fd74a234e 100644 --- a/src/librustc_msan/lib.rs +++ b/src/librustc_msan/lib.rs @@ -10,7 +10,6 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(stage0, feature(global_allocator))] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index 89d30fd666a88..4c9cdc1e6d35b 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -12,7 +12,6 @@ html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/")] #![feature(custom_attribute)] -#![cfg_attr(stage0, feature(macro_lifetime_matcher))] #![allow(unused_attributes)] #![recursion_limit="256"] diff --git a/src/librustc_tsan/lib.rs b/src/librustc_tsan/lib.rs index a7aeed7630959..0c78fd74a234e 100644 --- a/src/librustc_tsan/lib.rs +++ b/src/librustc_tsan/lib.rs @@ -10,7 +10,6 @@ #![sanitizer_runtime] #![feature(alloc_system)] -#![cfg_attr(stage0, feature(global_allocator))] #![feature(sanitizer_runtime)] #![feature(staged_api)] #![no_std] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index caad924ea5b5f..d73cb1f8349a6 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -322,7 +322,7 @@ #![feature(doc_keyword)] #![feature(float_internals)] #![feature(panic_info_message)] -#![cfg_attr(not(stage0), feature(panic_implementation))] +#![feature(panic_implementation)] #![default_lib_allocator] @@ -332,9 +332,6 @@ // `force_alloc_system` is *only* intended as a workaround for local rebuilds // with a rustc without jemalloc. // FIXME(#44236) shouldn't need MSVC logic -#![cfg_attr(all(not(target_env = "msvc"), - any(all(stage0, not(test)), feature = "force_alloc_system")), - feature(global_allocator))] #[cfg(all(not(target_env = "msvc"), any(all(stage0, not(test)), feature = "force_alloc_system")))] #[global_allocator] diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 0808efa2ecea5..46b6cf60705c1 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -319,18 +319,6 @@ pub fn panicking() -> bool { /// Entry point of panic from the libcore crate. #[cfg(not(test))] -#[cfg(stage0)] -#[lang = "panic_fmt"] -pub extern fn rust_begin_panic(msg: fmt::Arguments, - file: &'static str, - line: u32, - col: u32) -> ! { - begin_panic_fmt(&msg, &(file, line, col)) -} - -/// Entry point of panic from the libcore crate. -#[cfg(not(test))] -#[cfg(not(stage0))] #[panic_implementation] #[unwind(allowed)] pub fn rust_begin_panic(info: &PanicInfo) -> ! { @@ -343,78 +331,54 @@ pub fn rust_begin_panic(info: &PanicInfo) -> ! { /// site as much as possible (so that `panic!()` has as low an impact /// on (e.g.) the inlining of other functions as possible), by moving /// the actual formatting into this shared place. -#[cfg(stage0)] #[unstable(feature = "libstd_sys_internals", reason = "used by the panic! macro", issue = "0")] #[inline(never)] #[cold] pub fn begin_panic_fmt(msg: &fmt::Arguments, file_line_col: &(&'static str, u32, u32)) -> ! { - // We do two allocations here, unfortunately. But (a) they're - // required with the current scheme, and (b) we don't handle - // panic + OOM properly anyway (see comment in begin_panic - // below). - - rust_panic_with_hook(&mut PanicPayload::new(msg), Some(msg), file_line_col); -} - -// NOTE(stage0) move into `continue_panic_fmt` on next stage0 update -struct PanicPayload<'a> { - inner: &'a fmt::Arguments<'a>, - string: Option, + let (file, line, col) = *file_line_col; + let info = PanicInfo::internal_constructor( + Some(msg), + Location::internal_constructor(file, line, col), + ); + continue_panic_fmt(&info) } -impl<'a> PanicPayload<'a> { - fn new(inner: &'a fmt::Arguments<'a>) -> PanicPayload<'a> { - PanicPayload { inner, string: None } +fn continue_panic_fmt(info: &PanicInfo) -> ! { + struct PanicPayload<'a> { + inner: &'a fmt::Arguments<'a>, + string: Option, } - fn fill(&mut self) -> &mut String { - use fmt::Write; + impl<'a> PanicPayload<'a> { + fn new(inner: &'a fmt::Arguments<'a>) -> PanicPayload<'a> { + PanicPayload { inner, string: None } + } - let inner = self.inner; - self.string.get_or_insert_with(|| { - let mut s = String::new(); - drop(s.write_fmt(*inner)); - s - }) - } -} + fn fill(&mut self) -> &mut String { + use fmt::Write; -unsafe impl<'a> BoxMeUp for PanicPayload<'a> { - fn box_me_up(&mut self) -> *mut (Any + Send) { - let contents = mem::replace(self.fill(), String::new()); - Box::into_raw(Box::new(contents)) + let inner = self.inner; + self.string.get_or_insert_with(|| { + let mut s = String::new(); + drop(s.write_fmt(*inner)); + s + }) + } } - fn get(&mut self) -> &(Any + Send) { - self.fill() - } -} + unsafe impl<'a> BoxMeUp for PanicPayload<'a> { + fn box_me_up(&mut self) -> *mut (Any + Send) { + let contents = mem::replace(self.fill(), String::new()); + Box::into_raw(Box::new(contents)) + } -/// The entry point for panicking with a formatted message. -/// -/// This is designed to reduce the amount of code required at the call -/// site as much as possible (so that `panic!()` has as low an impact -/// on (e.g.) the inlining of other functions as possible), by moving -/// the actual formatting into this shared place. -#[cfg(not(stage0))] -#[unstable(feature = "libstd_sys_internals", - reason = "used by the panic! macro", - issue = "0")] -#[inline(never)] #[cold] -pub fn begin_panic_fmt(msg: &fmt::Arguments, - file_line_col: &(&'static str, u32, u32)) -> ! { - let (file, line, col) = *file_line_col; - let info = PanicInfo::internal_constructor( - Some(msg), - Location::internal_constructor(file, line, col), - ); - continue_panic_fmt(&info) -} + fn get(&mut self) -> &(Any + Send) { + self.fill() + } + } -#[cfg(not(stage0))] -fn continue_panic_fmt(info: &PanicInfo) -> ! { // We do two allocations here, unfortunately. But (a) they're // required with the current scheme, and (b) we don't handle // panic + OOM properly anyway (see comment in begin_panic diff --git a/src/stage0.txt b/src/stage0.txt index 435cfd2f6db4e..538f3a8517630 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-05-10 +date: 2018-06-30 rustc: beta cargo: beta diff --git a/src/tools/cargo b/src/tools/cargo index e2348c2db296c..5699afe508d62 160000 --- a/src/tools/cargo +++ b/src/tools/cargo @@ -1 +1 @@ -Subproject commit e2348c2db296ce33428933c3ab8786d5f3c54a2e +Subproject commit 5699afe508d62924f6b38b19dc98296ad33d1659 diff --git a/src/tools/rust-installer b/src/tools/rust-installer index 118e078c5badd..89414e44dc948 160000 --- a/src/tools/rust-installer +++ b/src/tools/rust-installer @@ -1 +1 @@ -Subproject commit 118e078c5badd520d18b92813fd88789c8d341ab +Subproject commit 89414e44dc94844888e59c08bc31dcccb1792800 From 3d6877496866472e1e9af9495d6989ee7ae866ef Mon Sep 17 00:00:00 2001 From: Mark Simulacrum Date: Thu, 28 Jun 2018 10:06:42 -0600 Subject: [PATCH 2/2] Notice non-toplevel dll dependencies in rustbuild Previously Cargo would hardlink all the dependencies into the "root" as foo.dll and the `toplevel` array would get populated with these, but that's no longer the case. Instead, cargo will only do this for the final artifacts/final libraries. Rustbuild is updated to continue looping through the artifacts mentioned instead of early-returning. This should fix the bug. @alexcrichton found the cause of this and suggested this fix. --- src/bootstrap/compile.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 11d9154ba696c..642f22b11ade3 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -1049,7 +1049,7 @@ pub fn run_cargo(builder: &Builder, cargo: &mut Command, stamp: &Path, is_check: !filename.ends_with(".lib") && !is_dylib(&filename) && !(is_check && filename.ends_with(".rmeta")) { - return; + continue; } let filename = Path::new(&*filename); @@ -1057,14 +1057,14 @@ pub fn run_cargo(builder: &Builder, cargo: &mut Command, stamp: &Path, is_check: // If this was an output file in the "host dir" we don't actually // worry about it, it's not relevant for us. if filename.starts_with(&host_root_dir) { - return; + continue; } // If this was output in the `deps` dir then this is a precise file // name (hash included) so we start tracking it. if filename.starts_with(&target_deps_dir) { deps.push(filename.to_path_buf()); - return; + continue; } // Otherwise this was a "top level artifact" which right now doesn't