Auto merge of #80511 - Mark-Simulacrum:bump-stage0, r=pietroalbini
Bump bootstrap compiler to 1.50 beta r? `@pietroalbini`
This commit is contained in:
commit
e226704685
15 changed files with 19 additions and 92 deletions
|
@ -15,8 +15,7 @@
|
||||||
#![feature(fn_traits)]
|
#![feature(fn_traits)]
|
||||||
#![feature(int_bits_const)]
|
#![feature(int_bits_const)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(allow_internal_unstable)]
|
#![feature(allow_internal_unstable)]
|
||||||
#![feature(hash_raw_entry)]
|
#![feature(hash_raw_entry)]
|
||||||
|
|
|
@ -112,8 +112,7 @@
|
||||||
#![feature(never_type)]
|
#![feature(never_type)]
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(nonnull_slice_from_raw_parts)]
|
#![feature(nonnull_slice_from_raw_parts)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![feature(or_patterns)]
|
#![feature(or_patterns)]
|
||||||
#![feature(pattern)]
|
#![feature(pattern)]
|
||||||
#![feature(ptr_internals)]
|
#![feature(ptr_internals)]
|
||||||
|
|
|
@ -1736,7 +1736,6 @@ extern "rust-intrinsic" {
|
||||||
|
|
||||||
/// Allocate at compile time. Should not be called at runtime.
|
/// Allocate at compile time. Should not be called at runtime.
|
||||||
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
|
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
|
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
#![feature(arbitrary_self_types)]
|
#![feature(arbitrary_self_types)]
|
||||||
#![feature(asm)]
|
#![feature(asm)]
|
||||||
#![feature(cfg_target_has_atomic)]
|
#![feature(cfg_target_has_atomic)]
|
||||||
#![cfg_attr(not(bootstrap), feature(const_heap))]
|
#![feature(const_heap)]
|
||||||
#![feature(const_alloc_layout)]
|
#![feature(const_alloc_layout)]
|
||||||
#![feature(const_assert_type)]
|
#![feature(const_assert_type)]
|
||||||
#![feature(const_discriminant)]
|
#![feature(const_discriminant)]
|
||||||
|
@ -124,8 +124,7 @@
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(exhaustive_patterns)]
|
#![feature(exhaustive_patterns)]
|
||||||
#![feature(no_core)]
|
#![feature(no_core)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![feature(or_patterns)]
|
#![feature(or_patterns)]
|
||||||
#![feature(prelude_import)]
|
#![feature(prelude_import)]
|
||||||
#![feature(repr_simd, platform_intrinsics)]
|
#![feature(repr_simd, platform_intrinsics)]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[allow_internal_unstable(core_panic, const_caller_location)]
|
#[allow_internal_unstable(core_panic, const_caller_location)]
|
||||||
#[stable(feature = "core", since = "1.6.0")]
|
#[stable(feature = "core", since = "1.6.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "core_panic_macro")]
|
#[rustc_diagnostic_item = "core_panic_macro"]
|
||||||
macro_rules! panic {
|
macro_rules! panic {
|
||||||
() => (
|
() => (
|
||||||
$crate::panic!("explicit panic")
|
$crate::panic!("explicit panic")
|
||||||
|
@ -163,7 +163,7 @@ macro_rules! assert_ne {
|
||||||
/// ```
|
/// ```
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "debug_assert_macro")]
|
#[rustc_diagnostic_item = "debug_assert_macro"]
|
||||||
macro_rules! debug_assert {
|
macro_rules! debug_assert {
|
||||||
($($arg:tt)*) => (if $crate::cfg!(debug_assertions) { $crate::assert!($($arg)*); })
|
($($arg:tt)*) => (if $crate::cfg!(debug_assertions) { $crate::assert!($($arg)*); })
|
||||||
}
|
}
|
||||||
|
@ -1217,7 +1217,7 @@ pub(crate) mod builtin {
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[rustc_builtin_macro]
|
#[rustc_builtin_macro]
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "assert_macro")]
|
#[rustc_diagnostic_item = "assert_macro"]
|
||||||
#[allow_internal_unstable(core_panic)]
|
#[allow_internal_unstable(core_panic)]
|
||||||
macro_rules! assert {
|
macro_rules! assert {
|
||||||
($cond:expr $(,)?) => {{ /* compiler built-in */ }};
|
($cond:expr $(,)?) => {{ /* compiler built-in */ }};
|
||||||
|
|
|
@ -991,16 +991,8 @@ impl<T> AtomicPtr<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn load(&self, order: Ordering) -> *mut T {
|
pub fn load(&self, order: Ordering) -> *mut T {
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
// SAFETY: data races are prevented by atomic intrinsics.
|
||||||
unsafe {
|
unsafe { atomic_load(self.p.get(), order) }
|
||||||
atomic_load(self.p.get(), order)
|
|
||||||
}
|
|
||||||
#[cfg(bootstrap)]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
|
||||||
unsafe {
|
|
||||||
atomic_load(self.p.get() as *mut usize, order) as *mut T
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stores a value into the pointer.
|
/// Stores a value into the pointer.
|
||||||
|
@ -1027,16 +1019,10 @@ impl<T> AtomicPtr<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub fn store(&self, ptr: *mut T, order: Ordering) {
|
pub fn store(&self, ptr: *mut T, order: Ordering) {
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
// SAFETY: data races are prevented by atomic intrinsics.
|
||||||
unsafe {
|
unsafe {
|
||||||
atomic_store(self.p.get(), ptr, order);
|
atomic_store(self.p.get(), ptr, order);
|
||||||
}
|
}
|
||||||
#[cfg(bootstrap)]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
|
||||||
unsafe {
|
|
||||||
atomic_store(self.p.get() as *mut usize, ptr as usize, order);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stores a value into the pointer, returning the previous value.
|
/// Stores a value into the pointer, returning the previous value.
|
||||||
|
@ -1065,16 +1051,8 @@ impl<T> AtomicPtr<T> {
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[cfg(target_has_atomic = "ptr")]
|
#[cfg(target_has_atomic = "ptr")]
|
||||||
pub fn swap(&self, ptr: *mut T, order: Ordering) -> *mut T {
|
pub fn swap(&self, ptr: *mut T, order: Ordering) -> *mut T {
|
||||||
#[cfg(bootstrap)]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
// SAFETY: data races are prevented by atomic intrinsics.
|
||||||
unsafe {
|
unsafe { atomic_swap(self.p.get(), ptr, order) }
|
||||||
atomic_swap(self.p.get() as *mut usize, ptr as usize, order) as *mut T
|
|
||||||
}
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
|
||||||
unsafe {
|
|
||||||
atomic_swap(self.p.get(), ptr, order)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stores a value into the pointer if the current value is the same as the `current` value.
|
/// Stores a value into the pointer if the current value is the same as the `current` value.
|
||||||
|
@ -1174,26 +1152,8 @@ impl<T> AtomicPtr<T> {
|
||||||
success: Ordering,
|
success: Ordering,
|
||||||
failure: Ordering,
|
failure: Ordering,
|
||||||
) -> Result<*mut T, *mut T> {
|
) -> Result<*mut T, *mut T> {
|
||||||
#[cfg(bootstrap)]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
// SAFETY: data races are prevented by atomic intrinsics.
|
||||||
unsafe {
|
unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) }
|
||||||
let res = atomic_compare_exchange(
|
|
||||||
self.p.get() as *mut usize,
|
|
||||||
current as usize,
|
|
||||||
new as usize,
|
|
||||||
success,
|
|
||||||
failure,
|
|
||||||
);
|
|
||||||
match res {
|
|
||||||
Ok(x) => Ok(x as *mut T),
|
|
||||||
Err(x) => Err(x as *mut T),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
|
||||||
unsafe {
|
|
||||||
atomic_compare_exchange(self.p.get(), current, new, success, failure)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stores a value into the pointer if the current value is the same as the `current` value.
|
/// Stores a value into the pointer if the current value is the same as the `current` value.
|
||||||
|
@ -1241,29 +1201,11 @@ impl<T> AtomicPtr<T> {
|
||||||
success: Ordering,
|
success: Ordering,
|
||||||
failure: Ordering,
|
failure: Ordering,
|
||||||
) -> Result<*mut T, *mut T> {
|
) -> Result<*mut T, *mut T> {
|
||||||
#[cfg(bootstrap)]
|
|
||||||
// SAFETY: data races are prevented by atomic intrinsics.
|
|
||||||
unsafe {
|
|
||||||
let res = atomic_compare_exchange_weak(
|
|
||||||
self.p.get() as *mut usize,
|
|
||||||
current as usize,
|
|
||||||
new as usize,
|
|
||||||
success,
|
|
||||||
failure,
|
|
||||||
);
|
|
||||||
match res {
|
|
||||||
Ok(x) => Ok(x as *mut T),
|
|
||||||
Err(x) => Err(x as *mut T),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
// SAFETY: This intrinsic is unsafe because it operates on a raw pointer
|
// SAFETY: This intrinsic is unsafe because it operates on a raw pointer
|
||||||
// but we know for sure that the pointer is valid (we just got it from
|
// but we know for sure that the pointer is valid (we just got it from
|
||||||
// an `UnsafeCell` that we have by reference) and the atomic operation
|
// an `UnsafeCell` that we have by reference) and the atomic operation
|
||||||
// itself allows us to safely mutate the `UnsafeCell` contents.
|
// itself allows us to safely mutate the `UnsafeCell` contents.
|
||||||
unsafe {
|
unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
|
||||||
atomic_compare_exchange_weak(self.p.get(), current, new, success, failure)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Fetches the value, and applies a function to it that returns an optional
|
/// Fetches the value, and applies a function to it that returns an optional
|
||||||
|
|
|
@ -134,7 +134,6 @@ fn test_discriminant_send_sync() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(not(bootstrap))]
|
|
||||||
fn assume_init_good() {
|
fn assume_init_good() {
|
||||||
const TRUE: bool = unsafe { MaybeUninit::<bool>::new(true).assume_init() };
|
const TRUE: bool = unsafe { MaybeUninit::<bool>::new(true).assume_init() };
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
#![feature(extern_types)]
|
#![feature(extern_types)]
|
||||||
#![feature(in_band_lifetimes)]
|
#![feature(in_band_lifetimes)]
|
||||||
#![feature(negative_impls)]
|
#![feature(negative_impls)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![feature(restricted_std)]
|
#![feature(restricted_std)]
|
||||||
#![feature(rustc_attrs)]
|
#![feature(rustc_attrs)]
|
||||||
#![feature(min_specialization)]
|
#![feature(min_specialization)]
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
#![feature(no_core)]
|
#![feature(no_core)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
#![feature(no_core)]
|
#![feature(no_core)]
|
||||||
#![feature(lang_items)]
|
#![feature(lang_items)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
#![no_core]
|
#![no_core]
|
||||||
|
|
||||||
|
|
|
@ -289,8 +289,7 @@
|
||||||
#![feature(nll)]
|
#![feature(nll)]
|
||||||
#![feature(nonnull_slice_from_raw_parts)]
|
#![feature(nonnull_slice_from_raw_parts)]
|
||||||
#![feature(once_cell)]
|
#![feature(once_cell)]
|
||||||
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
|
#![feature(auto_traits)]
|
||||||
#![cfg_attr(not(bootstrap), feature(auto_traits))]
|
|
||||||
#![feature(or_patterns)]
|
#![feature(or_patterns)]
|
||||||
#![feature(panic_info_message)]
|
#![feature(panic_info_message)]
|
||||||
#![feature(panic_internals)]
|
#![feature(panic_internals)]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
#[allow_internal_unstable(libstd_sys_internals)]
|
#[allow_internal_unstable(libstd_sys_internals)]
|
||||||
#[cfg_attr(not(any(bootstrap, test)), rustc_diagnostic_item = "std_panic_macro")]
|
#[cfg_attr(not(test), rustc_diagnostic_item = "std_panic_macro")]
|
||||||
macro_rules! panic {
|
macro_rules! panic {
|
||||||
() => ({ $crate::panic!("explicit panic") });
|
() => ({ $crate::panic!("explicit panic") });
|
||||||
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });
|
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });
|
||||||
|
|
|
@ -736,10 +736,7 @@ impl<'a> Builder<'a> {
|
||||||
if self.config.deny_warnings {
|
if self.config.deny_warnings {
|
||||||
cmd.arg("-Dwarnings");
|
cmd.arg("-Dwarnings");
|
||||||
}
|
}
|
||||||
// cfg(not(bootstrap)), can be removed on the next beta bump
|
|
||||||
if compiler.stage != 0 {
|
|
||||||
cmd.arg("-Znormalize-docs");
|
cmd.arg("-Znormalize-docs");
|
||||||
}
|
|
||||||
|
|
||||||
// Remove make-related flags that can cause jobserver problems.
|
// Remove make-related flags that can cause jobserver problems.
|
||||||
cmd.env_remove("MAKEFLAGS");
|
cmd.env_remove("MAKEFLAGS");
|
||||||
|
|
|
@ -530,10 +530,7 @@ impl Step for Rustc {
|
||||||
cargo.rustdocflag("--document-private-items");
|
cargo.rustdocflag("--document-private-items");
|
||||||
cargo.rustdocflag("--enable-index-page");
|
cargo.rustdocflag("--enable-index-page");
|
||||||
cargo.rustdocflag("-Zunstable-options");
|
cargo.rustdocflag("-Zunstable-options");
|
||||||
// cfg(not(bootstrap)), can be removed on the next beta bump
|
|
||||||
if stage != 0 {
|
|
||||||
cargo.rustdocflag("-Znormalize-docs");
|
cargo.rustdocflag("-Znormalize-docs");
|
||||||
}
|
|
||||||
compile::rustc_cargo(builder, &mut cargo, target);
|
compile::rustc_cargo(builder, &mut cargo, target);
|
||||||
|
|
||||||
// Only include compiler crates, no dependencies of those, such as `libc`.
|
// Only include compiler crates, no dependencies of those, such as `libc`.
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# stable release's version number. `date` is the date where the release we're
|
# stable release's version number. `date` is the date where the release we're
|
||||||
# bootstrapping off was released.
|
# bootstrapping off was released.
|
||||||
|
|
||||||
date: 2020-11-18
|
date: 2020-12-30
|
||||||
rustc: beta
|
rustc: beta
|
||||||
|
|
||||||
# We use a nightly rustfmt to format the source because it solves some
|
# We use a nightly rustfmt to format the source because it solves some
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue