Skip to content

Commit a0d664b

Browse files
committed
Auto merge of #79219 - shepmaster:beta-bump, r=Mark-Simulacrum
Bump bootstrap compiler version r? `@Mark-Simulacrum` /cc `@pietroalbini`
2 parents c643dd2 + dcef5ff commit a0d664b

File tree

18 files changed

+29
-64
lines changed

18 files changed

+29
-64
lines changed

library/alloc/src/alloc.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ extern "Rust" {
358358
/// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html
359359
/// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html
360360
#[stable(feature = "global_alloc", since = "1.28.0")]
361-
#[cfg(not(any(test, bootstrap)))]
361+
#[cfg(not(test))]
362362
#[rustc_allocator_nounwind]
363363
pub fn handle_alloc_error(layout: Layout) -> ! {
364364
unsafe {
@@ -370,22 +370,7 @@ pub fn handle_alloc_error(layout: Layout) -> ! {
370370
#[cfg(test)]
371371
pub use std::alloc::handle_alloc_error;
372372

373-
// In stage0 (bootstrap) `__rust_alloc_error_handler`,
374-
// might not be generated yet, because an old compiler is used,
375-
// so use the old direct call.
376-
#[cfg(all(bootstrap, not(test)))]
377-
#[stable(feature = "global_alloc", since = "1.28.0")]
378-
#[doc(hidden)]
379-
#[rustc_allocator_nounwind]
380-
pub fn handle_alloc_error(layout: Layout) -> ! {
381-
extern "Rust" {
382-
#[lang = "oom"]
383-
fn oom_impl(layout: Layout) -> !;
384-
}
385-
unsafe { oom_impl(layout) }
386-
}
387-
388-
#[cfg(not(any(target_os = "hermit", test, bootstrap)))]
373+
#[cfg(not(any(target_os = "hermit", test)))]
389374
#[doc(hidden)]
390375
#[allow(unused_attributes)]
391376
#[unstable(feature = "alloc_internals", issue = "none")]

library/alloc/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
#![allow(explicit_outlives_requirements)]
7373
#![allow(incomplete_features)]
7474
#![deny(unsafe_op_in_unsafe_fn)]
75-
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
75+
#![feature(rustc_allow_const_fn_unstable)]
7676
#![cfg_attr(not(test), feature(generator_trait))]
7777
#![cfg_attr(test, feature(test))]
7878
#![cfg_attr(test, feature(new_uninit))]
@@ -130,8 +130,7 @@
130130
#![feature(unicode_internals)]
131131
#![feature(unsafe_block_in_unsafe_fn)]
132132
#![feature(unsize)]
133-
#![cfg_attr(not(bootstrap), feature(unsized_fn_params))]
134-
#![cfg_attr(bootstrap, feature(unsized_locals))]
133+
#![feature(unsized_fn_params)]
135134
#![feature(allocator_internals)]
136135
#![feature(slice_partition_dedup)]
137136
#![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_uninit_array)]

library/alloc/src/raw_vec.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ impl<T> RawVec<T, Global> {
116116
impl<T, A: AllocRef> RawVec<T, A> {
117117
/// Like `new`, but parameterized over the choice of allocator for
118118
/// the returned `RawVec`.
119-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))]
120-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn))]
119+
#[rustc_allow_const_fn_unstable(const_fn)]
121120
pub const fn new_in(alloc: A) -> Self {
122121
// `cap: 0` means "unallocated". zero-sized types are ignored.
123122
Self { ptr: Unique::dangling(), cap: 0, alloc }

library/core/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#![warn(missing_debug_implementations)]
6464
#![allow(explicit_outlives_requirements)]
6565
#![allow(incomplete_features)]
66-
#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))]
66+
#![feature(rustc_allow_const_fn_unstable)]
6767
#![feature(allow_internal_unstable)]
6868
#![feature(arbitrary_self_types)]
6969
#![feature(asm)]
@@ -85,7 +85,7 @@
8585
#![feature(const_pin)]
8686
#![feature(const_fn)]
8787
#![feature(const_fn_union)]
88-
#![cfg_attr(not(bootstrap), feature(const_impl_trait))]
88+
#![feature(const_impl_trait)]
8989
#![feature(const_fn_floating_point_arithmetic)]
9090
#![feature(const_fn_fn_ptr_basics)]
9191
#![feature(const_generics)]
@@ -134,9 +134,7 @@
134134
#![feature(transparent_unions)]
135135
#![feature(try_blocks)]
136136
#![feature(unboxed_closures)]
137-
#![cfg_attr(not(bootstrap), feature(unsized_fn_params))]
138-
#![cfg_attr(bootstrap, feature(unsized_locals))]
139-
#![cfg_attr(bootstrap, feature(untagged_unions))]
137+
#![feature(unsized_fn_params)]
140138
#![feature(unwind_attributes)]
141139
#![feature(variant_count)]
142140
#![feature(tbm_target_feature)]
@@ -290,7 +288,7 @@ pub mod primitive;
290288
unused_imports,
291289
unsafe_op_in_unsafe_fn
292290
)]
293-
#[cfg_attr(not(bootstrap), allow(non_autolinks))]
291+
#[allow(non_autolinks)]
294292
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
295293
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
296294
#[allow(clashing_extern_declarations)]

library/core/src/num/int_macros.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,8 +2047,7 @@ assert_eq!(
20472047
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
20482048
// SAFETY: const sound because integers are plain old datatypes so we can always
20492049
// transmute them to arrays of bytes
2050-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
2051-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
2050+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
20522051
#[inline]
20532052
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
20542053
// SAFETY: integers are plain old datatypes so we can always transmute them to
@@ -2196,8 +2195,7 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
21962195
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
21972196
// SAFETY: const sound because integers are plain old datatypes so we can always
21982197
// transmute to them
2199-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
2200-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
2198+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
22012199
#[inline]
22022200
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
22032201
// SAFETY: integers are plain old datatypes so we can always transmute to them

library/core/src/num/uint_macros.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,8 +1805,7 @@ assert_eq!(
18051805
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
18061806
// SAFETY: const sound because integers are plain old datatypes so we can always
18071807
// transmute them to arrays of bytes
1808-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
1809-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
1808+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
18101809
#[inline]
18111810
pub const fn to_ne_bytes(self) -> [u8; mem::size_of::<Self>()] {
18121811
// SAFETY: integers are plain old datatypes so we can always transmute them to
@@ -1954,8 +1953,7 @@ fn read_ne_", stringify!($SelfT), "(input: &mut &[u8]) -> ", stringify!($SelfT),
19541953
#[rustc_const_stable(feature = "const_int_conversion", since = "1.44.0")]
19551954
// SAFETY: const sound because integers are plain old datatypes so we can always
19561955
// transmute to them
1957-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
1958-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
1956+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
19591957
#[inline]
19601958
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
19611959
// SAFETY: integers are plain old datatypes so we can always transmute to them

library/core/src/panicking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn panic(expr: &'static str) -> ! {
5252

5353
#[inline]
5454
#[track_caller]
55-
#[cfg_attr(not(bootstrap), lang = "panic_str")] // needed for const-evaluated panics
55+
#[lang = "panic_str"] // needed for const-evaluated panics
5656
pub fn panic_str(expr: &str) -> ! {
5757
panic_fmt(format_args!("{}", expr));
5858
}

library/core/src/slice/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl<T> [T] {
8888
#[rustc_const_stable(feature = "const_slice_len", since = "1.32.0")]
8989
#[inline]
9090
// SAFETY: const sound because we transmute out the length field as a usize (which it must be)
91-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_union))]
92-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_union))]
91+
#[rustc_allow_const_fn_unstable(const_fn_union)]
9392
pub const fn len(&self) -> usize {
9493
// SAFETY: this is safe because `&[T]` and `FatPtr<T>` have the same layout.
9594
// Only `std` can make this guarantee.

library/core/src/str/converts.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
157157
#[inline]
158158
#[stable(feature = "rust1", since = "1.0.0")]
159159
#[rustc_const_unstable(feature = "const_str_from_utf8_unchecked", issue = "75196")]
160-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
161-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
160+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
162161
pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
163162
// SAFETY: the caller must guarantee that the bytes `v` are valid UTF-8.
164163
// Also relies on `&str` and `&[u8]` having the same layout.

library/core/src/str/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ impl str {
219219
#[rustc_const_stable(feature = "str_as_bytes", since = "1.32.0")]
220220
#[inline(always)]
221221
#[allow(unused_attributes)]
222-
#[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn_transmute))]
223-
#[cfg_attr(bootstrap, allow_internal_unstable(const_fn_transmute))]
222+
#[rustc_allow_const_fn_unstable(const_fn_transmute)]
224223
pub const fn as_bytes(&self) -> &[u8] {
225224
// SAFETY: const sound because we transmute two types with the same layout
226225
unsafe { mem::transmute(self) }

0 commit comments

Comments
 (0)