Auto merge of #80511 - Mark-Simulacrum:bump-stage0, r=pietroalbini

Bump bootstrap compiler to 1.50 beta

r? `@pietroalbini`
This commit is contained in:
bors 2020-12-30 18:32:31 +00:00
commit e226704685
15 changed files with 19 additions and 92 deletions

View file

@ -15,8 +15,7 @@
#![feature(fn_traits)]
#![feature(int_bits_const)]
#![feature(min_specialization)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![feature(nll)]
#![feature(allow_internal_unstable)]
#![feature(hash_raw_entry)]

View file

@ -112,8 +112,7 @@
#![feature(never_type)]
#![feature(nll)]
#![feature(nonnull_slice_from_raw_parts)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![feature(or_patterns)]
#![feature(pattern)]
#![feature(ptr_internals)]

View file

@ -1736,7 +1736,6 @@
/// Allocate at compile time. Should not be called at runtime.
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
#[cfg(not(bootstrap))]
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
}

View file

@ -68,7 +68,7 @@
#![feature(arbitrary_self_types)]
#![feature(asm)]
#![feature(cfg_target_has_atomic)]
#![cfg_attr(not(bootstrap), feature(const_heap))]
#![feature(const_heap)]
#![feature(const_alloc_layout)]
#![feature(const_assert_type)]
#![feature(const_discriminant)]
@ -124,8 +124,7 @@
#![feature(nll)]
#![feature(exhaustive_patterns)]
#![feature(no_core)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![feature(or_patterns)]
#![feature(prelude_import)]
#![feature(repr_simd, platform_intrinsics)]

View file

@ -2,7 +2,7 @@
#[macro_export]
#[allow_internal_unstable(core_panic, const_caller_location)]
#[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 {
() => (
$crate::panic!("explicit panic")
@ -163,7 +163,7 @@ macro_rules! assert_ne {
/// ```
#[macro_export]
#[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 {
($($arg:tt)*) => (if $crate::cfg!(debug_assertions) { $crate::assert!($($arg)*); })
}
@ -1217,7 +1217,7 @@ macro_rules! include {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_builtin_macro]
#[macro_export]
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "assert_macro")]
#[rustc_diagnostic_item = "assert_macro"]
#[allow_internal_unstable(core_panic)]
macro_rules! assert {
($cond:expr $(,)?) => {{ /* compiler built-in */ }};

View file

@ -991,16 +991,8 @@ pub const fn into_inner(self) -> *mut T {
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn load(&self, order: Ordering) -> *mut T {
#[cfg(not(bootstrap))]
// SAFETY: data races are prevented by atomic intrinsics.
unsafe {
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
}
unsafe { atomic_load(self.p.get(), order) }
}
/// Stores a value into the pointer.
@ -1027,16 +1019,10 @@ pub fn load(&self, order: Ordering) -> *mut T {
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn store(&self, ptr: *mut T, order: Ordering) {
#[cfg(not(bootstrap))]
// SAFETY: data races are prevented by atomic intrinsics.
unsafe {
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.
@ -1065,16 +1051,8 @@ pub fn store(&self, ptr: *mut T, order: Ordering) {
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg(target_has_atomic = "ptr")]
pub fn swap(&self, ptr: *mut T, order: Ordering) -> *mut T {
#[cfg(bootstrap)]
// SAFETY: data races are prevented by atomic intrinsics.
unsafe {
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)
}
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.
@ -1174,26 +1152,8 @@ pub fn compare_exchange(
success: Ordering,
failure: Ordering,
) -> Result<*mut T, *mut T> {
#[cfg(bootstrap)]
// SAFETY: data races are prevented by atomic intrinsics.
unsafe {
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)
}
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.
@ -1241,29 +1201,11 @@ pub fn compare_exchange_weak(
success: Ordering,
failure: Ordering,
) -> 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
// 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
// itself allows us to safely mutate the `UnsafeCell` contents.
unsafe {
atomic_compare_exchange_weak(self.p.get(), current, new, success, failure)
}
unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
}
/// Fetches the value, and applies a function to it that returns an optional

View file

@ -134,7 +134,6 @@ fn is_send_sync<T: Send + Sync>() {}
}
#[test]
#[cfg(not(bootstrap))]
fn assume_init_good() {
const TRUE: bool = unsafe { MaybeUninit::<bool>::new(true).assume_init() };

View file

@ -28,8 +28,7 @@
#![feature(extern_types)]
#![feature(in_band_lifetimes)]
#![feature(negative_impls)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![feature(restricted_std)]
#![feature(rustc_attrs)]
#![feature(min_specialization)]

View file

@ -14,8 +14,7 @@
#![feature(no_core)]
#![feature(lang_items)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![crate_type = "rlib"]
#![no_core]
#![allow(non_camel_case_types)]

View file

@ -2,8 +2,7 @@
#![feature(no_core)]
#![feature(lang_items)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![crate_type = "rlib"]
#![no_core]

View file

@ -289,8 +289,7 @@
#![feature(nll)]
#![feature(nonnull_slice_from_raw_parts)]
#![feature(once_cell)]
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
#![cfg_attr(not(bootstrap), feature(auto_traits))]
#![feature(auto_traits)]
#![feature(or_patterns)]
#![feature(panic_info_message)]
#![feature(panic_internals)]

View file

@ -8,7 +8,7 @@
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[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 {
() => ({ $crate::panic!("explicit panic") });
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });

View file

@ -736,10 +736,7 @@ pub fn rustdoc_cmd(&self, compiler: Compiler) -> Command {
if self.config.deny_warnings {
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.
cmd.env_remove("MAKEFLAGS");

View file

@ -530,10 +530,7 @@ fn run(self, builder: &Builder<'_>) {
cargo.rustdocflag("--document-private-items");
cargo.rustdocflag("--enable-index-page");
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);
// Only include compiler crates, no dependencies of those, such as `libc`.

View file

@ -12,7 +12,7 @@
# stable release's version number. `date` is the date where the release we're
# bootstrapping off was released.
date: 2020-11-18
date: 2020-12-30
rustc: beta
# We use a nightly rustfmt to format the source because it solves some