Skip to content

Bump to 1.48 bootstrap compiler #77682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, U>(e: T) -> U;

/// Returns `true` if the actual type given as `T` requires drop
Expand Down
5 changes: 2 additions & 3 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down
6 changes: 1 addition & 5 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ pub use index::check_range;
#[lang = "slice"]
#[cfg(not(test))]
impl<T> [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 = {
Expand Down Expand Up @@ -108,15 +107,12 @@ impl<T> [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::<T>() <= 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
}
Expand Down
3 changes: 1 addition & 2 deletions library/core/src/task/wake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()),
Expand Down
2 changes: 1 addition & 1 deletion library/proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
5 changes: 2 additions & 3 deletions library/std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
# 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

# We use a nightly rustfmt to format the source because it solves some
# 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:
#
Expand Down