From d8c035abbf534d5e4101c2d4fb804a9e26dd6ccd Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 7 Oct 2020 18:56:26 -0400 Subject: [PATCH] Bump to 1.48 bootstrap compiler --- library/core/src/intrinsics.rs | 2 +- library/core/src/lib.rs | 5 ++--- library/core/src/slice/mod.rs | 6 +----- library/core/src/task/wake.rs | 3 +-- library/proc_macro/src/lib.rs | 2 +- library/std/src/lib.rs | 5 ++--- src/stage0.txt | 4 ++-- 7 files changed, 10 insertions(+), 17 deletions(-) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 426cdb12ec4e4..b2798ea66250f 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1072,7 +1072,7 @@ extern "rust-intrinsic" { // NOTE: While this makes the intrinsic const stable, we have some custom code in const fn // checks that prevent its use within `const fn`. #[rustc_const_stable(feature = "const_transmute", since = "1.46.0")] - #[cfg_attr(not(bootstrap), rustc_diagnostic_item = "transmute")] + #[rustc_diagnostic_item = "transmute"] pub fn transmute(e: T) -> U; /// Returns `true` if the actual type given as `T` requires drop diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 3aa68aa1d8d12..960a26fd28329 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -84,8 +84,8 @@ #![feature(const_fn_union)] #![feature(const_assume)] #![cfg_attr(not(bootstrap), feature(const_impl_trait))] -#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))] -#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))] +#![feature(const_fn_floating_point_arithmetic)] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_generics)] #![feature(const_option)] #![feature(const_precise_live_drops)] @@ -133,7 +133,6 @@ #![feature(untagged_unions)] #![feature(unwind_attributes)] #![feature(variant_count)] -#![cfg_attr(bootstrap, feature(doc_alias))] #![feature(tbm_target_feature)] #![feature(sse4a_target_feature)] #![feature(arm_target_feature)] diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 73d085c3fb299..13d0dda19c757 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -79,7 +79,6 @@ pub use index::check_range; #[lang = "slice"] #[cfg(not(test))] impl [T] { - #[cfg(not(bootstrap))] // Unused in bootstrap /// The maximum, inclusive, length such that the slice is no larger than `isize::MAX` bytes. /// This constant is used in `len` below. const MAX_LEN_BOUND: usize = { @@ -108,15 +107,12 @@ impl [T] { // Only `std` can make this guarantee. let raw_len = unsafe { crate::ptr::Repr { rust: self }.raw.len }; - #[cfg(not(bootstrap))] // FIXME: executing assume in const eval not supported in bootstrap // SAFETY: this assume asserts that `raw_len * size_of::() <= isize::MAX`. All // references must point to one allocation with size at most isize::MAX. Note that we the // multiplication could appear to overflow until we have assumed the bound. This overflow // would make additional values appear 'valid' and then `n > 1` the range of permissible // length would no longer be the full or even a single range. - unsafe { - crate::intrinsics::assume(raw_len <= Self::MAX_LEN_BOUND) - }; + unsafe { crate::intrinsics::assume(raw_len <= Self::MAX_LEN_BOUND) }; raw_len } diff --git a/library/core/src/task/wake.rs b/library/core/src/task/wake.rs index ba3fb35caaf9d..8cca9dc904293 100644 --- a/library/core/src/task/wake.rs +++ b/library/core/src/task/wake.rs @@ -130,8 +130,7 @@ impl RawWakerVTable { #[rustc_promotable] #[stable(feature = "futures_api", since = "1.36.0")] #[rustc_const_stable(feature = "futures_api", since = "1.36.0")] - #[cfg_attr(not(bootstrap), allow_internal_unstable(const_fn_fn_ptr_basics))] - #[cfg_attr(bootstrap, rustc_allow_const_fn_ptr)] + #[allow_internal_unstable(const_fn_fn_ptr_basics)] pub const fn new( clone: unsafe fn(*const ()) -> RawWaker, wake: unsafe fn(*const ()), diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 93fa1f4e58573..139b3591206e7 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -21,7 +21,7 @@ #![feature(nll)] #![feature(staged_api)] #![feature(const_fn)] -#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))] +#![feature(const_fn_fn_ptr_basics)] #![feature(allow_internal_unstable)] #![feature(decl_macro)] #![feature(extern_types)] diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index b2bd5f4da5012..d4cc2cd239bb7 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -237,10 +237,10 @@ #![feature(clamp)] #![feature(concat_idents)] #![feature(const_cstr_unchecked)] -#![cfg_attr(not(bootstrap), feature(const_fn_floating_point_arithmetic))] +#![feature(const_fn_floating_point_arithmetic)] #![feature(const_fn_transmute)] #![feature(const_fn)] -#![cfg_attr(not(bootstrap), feature(const_fn_fn_ptr_basics))] +#![feature(const_fn_fn_ptr_basics)] #![feature(const_ip)] #![feature(const_ipv6)] #![feature(const_raw_ptr_deref)] @@ -249,7 +249,6 @@ #![feature(core_intrinsics)] #![feature(custom_test_frameworks)] #![feature(decl_macro)] -#![cfg_attr(bootstrap, feature(doc_alias))] #![feature(doc_cfg)] #![feature(doc_keyword)] #![feature(doc_masked)] diff --git a/src/stage0.txt b/src/stage0.txt index f695b75c24d11..98b4dfa9c749b 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+1).0` for Cargo where they were released on `date`. -date: 2020-08-26 +date: 2020-10-07 rustc: beta cargo: beta @@ -20,7 +20,7 @@ cargo: beta # bootstrapping issues with use of new syntax in this repo. If you're looking at # the beta/stable branch, this key should be omitted, as we don't want to depend # on rustfmt from nightly there. -rustfmt: nightly-2020-07-12 +rustfmt: nightly-2020-10-07 # When making a stable release the process currently looks like: #