Skip to content

Commit e226704

Browse files
committed
Auto merge of #80511 - Mark-Simulacrum:bump-stage0, r=pietroalbini
Bump bootstrap compiler to 1.50 beta r? `@pietroalbini`
2 parents 507bff9 + fe03118 commit e226704

File tree

15 files changed

+19
-92
lines changed

15 files changed

+19
-92
lines changed

compiler/rustc_data_structures/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#![feature(fn_traits)]
1616
#![feature(int_bits_const)]
1717
#![feature(min_specialization)]
18-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
19-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
18+
#![feature(auto_traits)]
2019
#![feature(nll)]
2120
#![feature(allow_internal_unstable)]
2221
#![feature(hash_raw_entry)]

library/alloc/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@
112112
#![feature(never_type)]
113113
#![feature(nll)]
114114
#![feature(nonnull_slice_from_raw_parts)]
115-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
116-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
115+
#![feature(auto_traits)]
117116
#![feature(or_patterns)]
118117
#![feature(pattern)]
119118
#![feature(ptr_internals)]

library/core/src/intrinsics.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,6 @@ extern "rust-intrinsic" {
17361736

17371737
/// Allocate at compile time. Should not be called at runtime.
17381738
#[rustc_const_unstable(feature = "const_heap", issue = "79597")]
1739-
#[cfg(not(bootstrap))]
17401739
pub fn const_allocate(size: usize, align: usize) -> *mut u8;
17411740
}
17421741

library/core/src/lib.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#![feature(arbitrary_self_types)]
6969
#![feature(asm)]
7070
#![feature(cfg_target_has_atomic)]
71-
#![cfg_attr(not(bootstrap), feature(const_heap))]
71+
#![feature(const_heap)]
7272
#![feature(const_alloc_layout)]
7373
#![feature(const_assert_type)]
7474
#![feature(const_discriminant)]
@@ -124,8 +124,7 @@
124124
#![feature(nll)]
125125
#![feature(exhaustive_patterns)]
126126
#![feature(no_core)]
127-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
128-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
127+
#![feature(auto_traits)]
129128
#![feature(or_patterns)]
130129
#![feature(prelude_import)]
131130
#![feature(repr_simd, platform_intrinsics)]

library/core/src/macros/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#[macro_export]
33
#[allow_internal_unstable(core_panic, const_caller_location)]
44
#[stable(feature = "core", since = "1.6.0")]
5-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "core_panic_macro")]
5+
#[rustc_diagnostic_item = "core_panic_macro"]
66
macro_rules! panic {
77
() => (
88
$crate::panic!("explicit panic")
@@ -163,7 +163,7 @@ macro_rules! assert_ne {
163163
/// ```
164164
#[macro_export]
165165
#[stable(feature = "rust1", since = "1.0.0")]
166-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "debug_assert_macro")]
166+
#[rustc_diagnostic_item = "debug_assert_macro"]
167167
macro_rules! debug_assert {
168168
($($arg:tt)*) => (if $crate::cfg!(debug_assertions) { $crate::assert!($($arg)*); })
169169
}
@@ -1217,7 +1217,7 @@ pub(crate) mod builtin {
12171217
#[stable(feature = "rust1", since = "1.0.0")]
12181218
#[rustc_builtin_macro]
12191219
#[macro_export]
1220-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "assert_macro")]
1220+
#[rustc_diagnostic_item = "assert_macro"]
12211221
#[allow_internal_unstable(core_panic)]
12221222
macro_rules! assert {
12231223
($cond:expr $(,)?) => {{ /* compiler built-in */ }};

library/core/src/sync/atomic.rs

+4-62
Original file line numberDiff line numberDiff line change
@@ -991,16 +991,8 @@ impl<T> AtomicPtr<T> {
991991
#[inline]
992992
#[stable(feature = "rust1", since = "1.0.0")]
993993
pub fn load(&self, order: Ordering) -> *mut T {
994-
#[cfg(not(bootstrap))]
995994
// SAFETY: data races are prevented by atomic intrinsics.
996-
unsafe {
997-
atomic_load(self.p.get(), order)
998-
}
999-
#[cfg(bootstrap)]
1000-
// SAFETY: data races are prevented by atomic intrinsics.
1001-
unsafe {
1002-
atomic_load(self.p.get() as *mut usize, order) as *mut T
1003-
}
995+
unsafe { atomic_load(self.p.get(), order) }
1004996
}
1005997

1006998
/// Stores a value into the pointer.
@@ -1027,16 +1019,10 @@ impl<T> AtomicPtr<T> {
10271019
#[inline]
10281020
#[stable(feature = "rust1", since = "1.0.0")]
10291021
pub fn store(&self, ptr: *mut T, order: Ordering) {
1030-
#[cfg(not(bootstrap))]
10311022
// SAFETY: data races are prevented by atomic intrinsics.
10321023
unsafe {
10331024
atomic_store(self.p.get(), ptr, order);
10341025
}
1035-
#[cfg(bootstrap)]
1036-
// SAFETY: data races are prevented by atomic intrinsics.
1037-
unsafe {
1038-
atomic_store(self.p.get() as *mut usize, ptr as usize, order);
1039-
}
10401026
}
10411027

10421028
/// Stores a value into the pointer, returning the previous value.
@@ -1065,16 +1051,8 @@ impl<T> AtomicPtr<T> {
10651051
#[stable(feature = "rust1", since = "1.0.0")]
10661052
#[cfg(target_has_atomic = "ptr")]
10671053
pub fn swap(&self, ptr: *mut T, order: Ordering) -> *mut T {
1068-
#[cfg(bootstrap)]
1069-
// SAFETY: data races are prevented by atomic intrinsics.
1070-
unsafe {
1071-
atomic_swap(self.p.get() as *mut usize, ptr as usize, order) as *mut T
1072-
}
1073-
#[cfg(not(bootstrap))]
10741054
// SAFETY: data races are prevented by atomic intrinsics.
1075-
unsafe {
1076-
atomic_swap(self.p.get(), ptr, order)
1077-
}
1055+
unsafe { atomic_swap(self.p.get(), ptr, order) }
10781056
}
10791057

10801058
/// 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> {
11741152
success: Ordering,
11751153
failure: Ordering,
11761154
) -> Result<*mut T, *mut T> {
1177-
#[cfg(bootstrap)]
11781155
// SAFETY: data races are prevented by atomic intrinsics.
1179-
unsafe {
1180-
let res = atomic_compare_exchange(
1181-
self.p.get() as *mut usize,
1182-
current as usize,
1183-
new as usize,
1184-
success,
1185-
failure,
1186-
);
1187-
match res {
1188-
Ok(x) => Ok(x as *mut T),
1189-
Err(x) => Err(x as *mut T),
1190-
}
1191-
}
1192-
#[cfg(not(bootstrap))]
1193-
// SAFETY: data races are prevented by atomic intrinsics.
1194-
unsafe {
1195-
atomic_compare_exchange(self.p.get(), current, new, success, failure)
1196-
}
1156+
unsafe { atomic_compare_exchange(self.p.get(), current, new, success, failure) }
11971157
}
11981158

11991159
/// 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> {
12411201
success: Ordering,
12421202
failure: Ordering,
12431203
) -> Result<*mut T, *mut T> {
1244-
#[cfg(bootstrap)]
1245-
// SAFETY: data races are prevented by atomic intrinsics.
1246-
unsafe {
1247-
let res = atomic_compare_exchange_weak(
1248-
self.p.get() as *mut usize,
1249-
current as usize,
1250-
new as usize,
1251-
success,
1252-
failure,
1253-
);
1254-
match res {
1255-
Ok(x) => Ok(x as *mut T),
1256-
Err(x) => Err(x as *mut T),
1257-
}
1258-
}
1259-
#[cfg(not(bootstrap))]
12601204
// SAFETY: This intrinsic is unsafe because it operates on a raw pointer
12611205
// but we know for sure that the pointer is valid (we just got it from
12621206
// an `UnsafeCell` that we have by reference) and the atomic operation
12631207
// itself allows us to safely mutate the `UnsafeCell` contents.
1264-
unsafe {
1265-
atomic_compare_exchange_weak(self.p.get(), current, new, success, failure)
1266-
}
1208+
unsafe { atomic_compare_exchange_weak(self.p.get(), current, new, success, failure) }
12671209
}
12681210

12691211
/// Fetches the value, and applies a function to it that returns an optional

library/core/tests/mem.rs

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ fn test_discriminant_send_sync() {
134134
}
135135

136136
#[test]
137-
#[cfg(not(bootstrap))]
138137
fn assume_init_good() {
139138
const TRUE: bool = unsafe { MaybeUninit::<bool>::new(true).assume_init() };
140139

library/proc_macro/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
#![feature(extern_types)]
2929
#![feature(in_band_lifetimes)]
3030
#![feature(negative_impls)]
31-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
32-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
31+
#![feature(auto_traits)]
3332
#![feature(restricted_std)]
3433
#![feature(rustc_attrs)]
3534
#![feature(min_specialization)]

library/rtstartup/rsbegin.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414

1515
#![feature(no_core)]
1616
#![feature(lang_items)]
17-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
18-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
17+
#![feature(auto_traits)]
1918
#![crate_type = "rlib"]
2019
#![no_core]
2120
#![allow(non_camel_case_types)]

library/rtstartup/rsend.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
#![feature(no_core)]
44
#![feature(lang_items)]
5-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
6-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
5+
#![feature(auto_traits)]
76
#![crate_type = "rlib"]
87
#![no_core]
98

library/std/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,7 @@
289289
#![feature(nll)]
290290
#![feature(nonnull_slice_from_raw_parts)]
291291
#![feature(once_cell)]
292-
#![cfg_attr(bootstrap, feature(optin_builtin_traits))]
293-
#![cfg_attr(not(bootstrap), feature(auto_traits))]
292+
#![feature(auto_traits)]
294293
#![feature(or_patterns)]
295294
#![feature(panic_info_message)]
296295
#![feature(panic_internals)]

library/std/src/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#[macro_export]
99
#[stable(feature = "rust1", since = "1.0.0")]
1010
#[allow_internal_unstable(libstd_sys_internals)]
11-
#[cfg_attr(not(any(bootstrap, test)), rustc_diagnostic_item = "std_panic_macro")]
11+
#[cfg_attr(not(test), rustc_diagnostic_item = "std_panic_macro")]
1212
macro_rules! panic {
1313
() => ({ $crate::panic!("explicit panic") });
1414
($msg:expr $(,)?) => ({ $crate::rt::begin_panic($msg) });

src/bootstrap/builder.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,7 @@ impl<'a> Builder<'a> {
736736
if self.config.deny_warnings {
737737
cmd.arg("-Dwarnings");
738738
}
739-
// cfg(not(bootstrap)), can be removed on the next beta bump
740-
if compiler.stage != 0 {
741-
cmd.arg("-Znormalize-docs");
742-
}
739+
cmd.arg("-Znormalize-docs");
743740

744741
// Remove make-related flags that can cause jobserver problems.
745742
cmd.env_remove("MAKEFLAGS");

src/bootstrap/doc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,7 @@ impl Step for Rustc {
530530
cargo.rustdocflag("--document-private-items");
531531
cargo.rustdocflag("--enable-index-page");
532532
cargo.rustdocflag("-Zunstable-options");
533-
// cfg(not(bootstrap)), can be removed on the next beta bump
534-
if stage != 0 {
535-
cargo.rustdocflag("-Znormalize-docs");
536-
}
533+
cargo.rustdocflag("-Znormalize-docs");
537534
compile::rustc_cargo(builder, &mut cargo, target);
538535

539536
// Only include compiler crates, no dependencies of those, such as `libc`.

src/stage0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# stable release's version number. `date` is the date where the release we're
1313
# bootstrapping off was released.
1414

15-
date: 2020-11-18
15+
date: 2020-12-30
1616
rustc: beta
1717

1818
# We use a nightly rustfmt to format the source because it solves some

0 commit comments

Comments
 (0)