Skip to content

Commit 8c93111

Browse files
borsgitbot
authored and
gitbot
committed
Auto merge of rust-lang#133533 - BoxyUwU:bump-boostrap, r=jieyouxu,Mark-Simulacrum
Bump boostrap compiler to new beta Currently failing due to something about the const stability checks and `panic!`. I'm not sure why though since I wasn't able to see any PRs merged in the past few days that would result in a `cfg(bootstrap)` that shouldn't be removed. cc `@RalfJung` rust-lang#131349
2 parents 1e920b6 + ba5e0f5 commit 8c93111

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+193
-437
lines changed

alloc/benches/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#![feature(iter_next_chunk)]
55
#![feature(repr_simd)]
66
#![feature(slice_partition_dedup)]
7-
#![cfg_attr(bootstrap, feature(strict_provenance))]
8-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
7+
#![feature(strict_provenance_lints)]
98
#![feature(test)]
109
#![deny(fuzzy_provenance_casts)]
1110

alloc/src/boxed.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ use core::error::{self, Error};
191191
use core::fmt;
192192
use core::future::Future;
193193
use core::hash::{Hash, Hasher};
194-
#[cfg(not(bootstrap))]
195-
use core::marker::PointerLike;
196-
use core::marker::{Tuple, Unsize};
194+
use core::marker::{PointerLike, Tuple, Unsize};
197195
use core::mem::{self, SizedTypeProperties};
198196
use core::ops::{
199197
AsyncFn, AsyncFnMut, AsyncFnOnce, CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut,
@@ -227,7 +225,7 @@ pub use thin::ThinBox;
227225
#[fundamental]
228226
#[stable(feature = "rust1", since = "1.0.0")]
229227
#[rustc_insignificant_dtor]
230-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
228+
#[doc(search_unbox)]
231229
// The declaration of the `Box` struct must be kept in sync with the
232230
// compiler or ICEs will happen.
233231
pub struct Box<
@@ -1502,7 +1500,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15021500
/// [`as_ptr`]: Self::as_ptr
15031501
#[unstable(feature = "box_as_ptr", issue = "129090")]
15041502
#[rustc_never_returns_null_ptr]
1505-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1503+
#[rustc_as_ptr]
15061504
#[inline]
15071505
pub fn as_mut_ptr(b: &mut Self) -> *mut T {
15081506
// This is a primitive deref, not going through `DerefMut`, and therefore not materializing
@@ -1551,7 +1549,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
15511549
/// [`as_ptr`]: Self::as_ptr
15521550
#[unstable(feature = "box_as_ptr", issue = "129090")]
15531551
#[rustc_never_returns_null_ptr]
1554-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1552+
#[rustc_as_ptr]
15551553
#[inline]
15561554
pub fn as_ptr(b: &Self) -> *const T {
15571555
// This is a primitive deref, not going through `DerefMut`, and therefore not materializing
@@ -2134,6 +2132,5 @@ impl<E: Error> Error for Box<E> {
21342132
}
21352133
}
21362134

2137-
#[cfg(not(bootstrap))]
21382135
#[unstable(feature = "pointer_like_trait", issue = "none")]
21392136
impl<T> PointerLike for Box<T> {}

alloc/src/boxed/convert.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<T: Clone> From<&[T]> for Box<[T]> {
110110
}
111111

112112
#[cfg(not(no_global_oom_handling))]
113-
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
113+
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
114114
impl<T: Clone> From<&mut [T]> for Box<[T]> {
115115
/// Converts a `&mut [T]` into a `Box<[T]>`
116116
///
@@ -171,7 +171,7 @@ impl From<&str> for Box<str> {
171171
}
172172

173173
#[cfg(not(no_global_oom_handling))]
174-
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
174+
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
175175
impl From<&mut str> for Box<str> {
176176
/// Converts a `&mut str` into a `Box<str>`
177177
///

alloc/src/ffi/c_str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ impl From<&CStr> for Box<CStr> {
773773
}
774774

775775
#[cfg(not(test))]
776-
#[stable(feature = "box_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
776+
#[stable(feature = "box_from_mut_slice", since = "1.84.0")]
777777
impl From<&mut CStr> for Box<CStr> {
778778
/// Converts a `&mut CStr` into a `Box<CStr>`,
779779
/// by copying the contents into a newly allocated [`Box`].
@@ -921,7 +921,7 @@ impl From<&CStr> for Arc<CStr> {
921921
}
922922

923923
#[cfg(target_has_atomic = "ptr")]
924-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
924+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
925925
impl From<&mut CStr> for Arc<CStr> {
926926
/// Converts a `&mut CStr` into a `Arc<CStr>`,
927927
/// by copying the contents into a newly allocated [`Arc`].
@@ -953,7 +953,7 @@ impl From<&CStr> for Rc<CStr> {
953953
}
954954
}
955955

956-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
956+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
957957
impl From<&mut CStr> for Rc<CStr> {
958958
/// Converts a `&mut CStr` into a `Rc<CStr>`,
959959
/// by copying the contents into a newly allocated [`Rc`].

alloc/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@
163163
//
164164
// Language features:
165165
// tidy-alphabetical-start
166-
#![cfg_attr(bootstrap, feature(strict_provenance))]
167-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
168166
#![cfg_attr(not(test), feature(coroutine_trait))]
169167
#![cfg_attr(test, feature(panic_update_hook))]
170168
#![cfg_attr(test, feature(test))]
@@ -188,6 +186,7 @@
188186
#![feature(slice_internals)]
189187
#![feature(staged_api)]
190188
#![feature(stmt_expr_attributes)]
189+
#![feature(strict_provenance_lints)]
191190
#![feature(unboxed_closures)]
192191
#![feature(unsized_fn_params)]
193192
#![feature(with_negative_coherence)]

alloc/src/raw_vec.rs

-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ impl<T> RawVec<T, Global> {
103103
/// `RawVec` with capacity `usize::MAX`. Useful for implementing
104104
/// delayed allocation.
105105
#[must_use]
106-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
107106
pub const fn new() -> Self {
108107
Self::new_in(Global)
109108
}
@@ -179,7 +178,6 @@ impl<T, A: Allocator> RawVec<T, A> {
179178
/// Like `new`, but parameterized over the choice of allocator for
180179
/// the returned `RawVec`.
181180
#[inline]
182-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
183181
pub const fn new_in(alloc: A) -> Self {
184182
Self { inner: RawVecInner::new_in(alloc, align_of::<T>()), _marker: PhantomData }
185183
}
@@ -409,7 +407,6 @@ unsafe impl<#[may_dangle] T, A: Allocator> Drop for RawVec<T, A> {
409407

410408
impl<A: Allocator> RawVecInner<A> {
411409
#[inline]
412-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "raw_vec_internals_const", since = "1.81"))]
413410
const fn new_in(alloc: A, align: usize) -> Self {
414411
let ptr = unsafe { core::mem::transmute(align) };
415412
// `cap: 0` means "unallocated". zero-sized types are ignored.

alloc/src/rc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ fn rc_inner_layout_for_value_layout(layout: Layout) -> Layout {
307307
/// `value.get_mut()`. This avoids conflicts with methods of the inner type `T`.
308308
///
309309
/// [get_mut]: Rc::get_mut
310-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
310+
#[doc(search_unbox)]
311311
#[cfg_attr(not(test), rustc_diagnostic_item = "Rc")]
312312
#[stable(feature = "rust1", since = "1.0.0")]
313313
#[rustc_insignificant_dtor]
@@ -2659,7 +2659,7 @@ impl<T: Clone> From<&[T]> for Rc<[T]> {
26592659
}
26602660

26612661
#[cfg(not(no_global_oom_handling))]
2662-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
2662+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
26632663
impl<T: Clone> From<&mut [T]> for Rc<[T]> {
26642664
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
26652665
///
@@ -2698,7 +2698,7 @@ impl From<&str> for Rc<str> {
26982698
}
26992699

27002700
#[cfg(not(no_global_oom_handling))]
2701-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
2701+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
27022702
impl From<&mut str> for Rc<str> {
27032703
/// Allocates a reference-counted string slice and copies `v` into it.
27042704
///

alloc/src/sync.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ macro_rules! acquire {
235235
/// counting in general.
236236
///
237237
/// [rc_examples]: crate::rc#examples
238-
#[cfg_attr(not(bootstrap), doc(search_unbox))]
238+
#[doc(search_unbox)]
239239
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
240240
#[stable(feature = "rust1", since = "1.0.0")]
241241
#[rustc_insignificant_dtor]
@@ -3618,7 +3618,7 @@ impl<T: Clone> From<&[T]> for Arc<[T]> {
36183618
}
36193619

36203620
#[cfg(not(no_global_oom_handling))]
3621-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
3621+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
36223622
impl<T: Clone> From<&mut [T]> for Arc<[T]> {
36233623
/// Allocates a reference-counted slice and fills it by cloning `v`'s items.
36243624
///
@@ -3657,7 +3657,7 @@ impl From<&str> for Arc<str> {
36573657
}
36583658

36593659
#[cfg(not(no_global_oom_handling))]
3660-
#[stable(feature = "shared_from_mut_slice", since = "CURRENT_RUSTC_VERSION")]
3660+
#[stable(feature = "shared_from_mut_slice", since = "1.84.0")]
36613661
impl From<&mut str> for Arc<str> {
36623662
/// Allocates a reference-counted `str` and copies `v` into it.
36633663
///

alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ impl<T, A: Allocator> Vec<T, A> {
16621662
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
16631663
#[rustc_const_unstable(feature = "const_vec_string_slice", issue = "129041")]
16641664
#[rustc_never_returns_null_ptr]
1665-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1665+
#[rustc_as_ptr]
16661666
#[inline]
16671667
pub const fn as_ptr(&self) -> *const T {
16681668
// We shadow the slice method of the same name to avoid going through
@@ -1725,7 +1725,7 @@ impl<T, A: Allocator> Vec<T, A> {
17251725
#[stable(feature = "vec_as_ptr", since = "1.37.0")]
17261726
#[rustc_const_unstable(feature = "const_vec_string_slice", issue = "129041")]
17271727
#[rustc_never_returns_null_ptr]
1728-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1728+
#[rustc_as_ptr]
17291729
#[inline]
17301730
pub const fn as_mut_ptr(&mut self) -> *mut T {
17311731
// We shadow the slice method of the same name to avoid going through

alloc/tests/boxed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use core::mem::MaybeUninit;
44
use core::ptr::NonNull;
55

66
#[test]
7-
#[cfg_attr(not(bootstrap), expect(dangling_pointers_from_temporaries))]
7+
#[expect(dangling_pointers_from_temporaries)]
88
fn uninitialized_zero_size_box() {
99
assert_eq!(
1010
&*Box::<()>::new_uninit() as *const _,

alloc/tests/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@
3232
#![feature(panic_update_hook)]
3333
#![feature(pointer_is_aligned_to)]
3434
#![feature(thin_box)]
35-
#![cfg_attr(bootstrap, feature(strict_provenance))]
36-
#![cfg_attr(not(bootstrap), feature(strict_provenance_lints))]
3735
#![feature(drain_keep_rest)]
3836
#![feature(local_waker)]
37+
#![feature(strict_provenance_lints)]
3938
#![feature(vec_pop_if)]
4039
#![feature(unique_rc_arc)]
4140
#![feature(macro_metavar_expr_concat)]

core/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ check-cfg = [
4343
'cfg(bootstrap)',
4444
'cfg(no_fp_fmt_parse)',
4545
'cfg(stdarch_intel_sde)',
46-
# #[cfg(bootstrap)] rtems
47-
'cfg(target_os, values("rtems"))',
4846
# core use #[path] imports to portable-simd `core_simd` crate
4947
# and to stdarch `core_arch` crate which messes-up with Cargo list
5048
# of declared features, we therefor expect any feature cfg

core/src/alloc/layout.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ impl Layout {
157157
#[must_use = "this returns the minimum alignment, \
158158
without modifying the layout"]
159159
#[inline]
160-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(ptr_alignment_type))]
161160
pub const fn align(&self) -> usize {
162161
self.align.as_usize()
163162
}
@@ -255,7 +254,7 @@ impl Layout {
255254
/// `align` violates the conditions listed in [`Layout::from_size_align`].
256255
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
257256
#[rustc_const_unstable(feature = "const_alloc_layout", issue = "67521")]
258-
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
257+
#[rustc_const_stable_indirect]
259258
#[inline]
260259
pub const fn align_to(&self, align: usize) -> Result<Self, LayoutError> {
261260
if let Some(align) = Alignment::new(align) {
@@ -331,7 +330,7 @@ impl Layout {
331330
/// to the layout's current size.
332331
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
333332
#[rustc_const_unstable(feature = "const_alloc_layout", issue = "67521")]
334-
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
333+
#[rustc_const_stable_indirect]
335334
#[must_use = "this returns a new `Layout`, \
336335
without modifying the original"]
337336
#[inline]
@@ -431,7 +430,7 @@ impl Layout {
431430
/// ```
432431
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
433432
#[rustc_const_unstable(feature = "const_alloc_layout", issue = "67521")]
434-
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
433+
#[rustc_const_stable_indirect]
435434
#[inline]
436435
pub const fn extend(&self, next: Self) -> Result<(Self, usize), LayoutError> {
437436
let new_align = Alignment::max(self.align, next.align);
@@ -495,7 +494,7 @@ impl Layout {
495494
/// `isize::MAX`, returns `LayoutError`.
496495
#[stable(feature = "alloc_layout_manipulation", since = "1.44.0")]
497496
#[rustc_const_unstable(feature = "const_alloc_layout", issue = "67521")]
498-
#[cfg_attr(not(bootstrap), rustc_const_stable_indirect)]
497+
#[rustc_const_stable_indirect]
499498
#[inline]
500499
pub const fn array<T>(n: usize) -> Result<Self, LayoutError> {
501500
// Reduce the amount of code we need to monomorphize per `T`.

core/src/cell.rs

+6-7
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ impl<T: ?Sized> Cell<T> {
587587
#[inline]
588588
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
589589
#[rustc_const_stable(feature = "const_cell_as_ptr", since = "1.32.0")]
590-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
590+
#[rustc_as_ptr]
591591
#[rustc_never_returns_null_ptr]
592592
pub const fn as_ptr(&self) -> *mut T {
593593
self.value.get()
@@ -1150,7 +1150,7 @@ impl<T: ?Sized> RefCell<T> {
11501150
/// ```
11511151
#[inline]
11521152
#[stable(feature = "cell_as_ptr", since = "1.12.0")]
1153-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
1153+
#[rustc_as_ptr]
11541154
#[rustc_never_returns_null_ptr]
11551155
pub fn as_ptr(&self) -> *mut T {
11561156
self.value.get()
@@ -2133,9 +2133,8 @@ impl<T: ?Sized> UnsafeCell<T> {
21332133
/// assert_eq!(*uc.get_mut(), 41);
21342134
/// ```
21352135
#[inline(always)]
2136-
#[stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
2137-
#[rustc_const_stable(feature = "unsafe_cell_from_mut", since = "CURRENT_RUSTC_VERSION")]
2138-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
2136+
#[stable(feature = "unsafe_cell_from_mut", since = "1.84.0")]
2137+
#[rustc_const_stable(feature = "unsafe_cell_from_mut", since = "1.84.0")]
21392138
pub const fn from_mut(value: &mut T) -> &mut UnsafeCell<T> {
21402139
// SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
21412140
unsafe { &mut *(value as *mut T as *mut UnsafeCell<T>) }
@@ -2160,7 +2159,7 @@ impl<T: ?Sized> UnsafeCell<T> {
21602159
#[inline(always)]
21612160
#[stable(feature = "rust1", since = "1.0.0")]
21622161
#[rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0")]
2163-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
2162+
#[rustc_as_ptr]
21642163
#[rustc_never_returns_null_ptr]
21652164
pub const fn get(&self) -> *mut T {
21662165
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
@@ -2308,7 +2307,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
23082307
/// when casting to `&mut T`, and ensure that there are no mutations
23092308
/// or mutable aliases going on when casting to `&T`
23102309
#[inline]
2311-
#[cfg_attr(not(bootstrap), rustc_as_ptr)]
2310+
#[rustc_as_ptr]
23122311
#[rustc_never_returns_null_ptr]
23132312
pub const fn get(&self) -> *mut T {
23142313
self.value.get()

core/src/char/methods.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ impl char {
729729
/// '𝕊'.encode_utf16(&mut b);
730730
/// ```
731731
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
732-
#[rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")]
732+
#[rustc_const_stable(feature = "const_char_encode_utf16", since = "1.84.0")]
733733
#[inline]
734734
pub const fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] {
735735
encode_utf16_raw(self as u32, dst)
@@ -1299,7 +1299,7 @@ impl char {
12991299
///
13001300
/// [`to_ascii_uppercase()`]: #method.to_ascii_uppercase
13011301
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1302-
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
1302+
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
13031303
#[inline]
13041304
pub const fn make_ascii_uppercase(&mut self) {
13051305
*self = self.to_ascii_uppercase();
@@ -1325,7 +1325,7 @@ impl char {
13251325
///
13261326
/// [`to_ascii_lowercase()`]: #method.to_ascii_lowercase
13271327
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
1328-
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
1328+
#[rustc_const_stable(feature = "const_make_ascii", since = "1.84.0")]
13291329
#[inline]
13301330
pub const fn make_ascii_lowercase(&mut self) {
13311331
*self = self.to_ascii_lowercase();
@@ -1787,7 +1787,6 @@ const fn len_utf16(code: u32) -> usize {
17871787
/// Panics if the buffer is not large enough.
17881788
/// A buffer of length four is large enough to encode any `char`.
17891789
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
1790-
#[cfg_attr(bootstrap, rustc_const_stable(feature = "const_char_encode_utf8", since = "1.83.0"))]
17911790
#[doc(hidden)]
17921791
#[inline]
17931792
pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
@@ -1836,10 +1835,6 @@ pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
18361835
/// Panics if the buffer is not large enough.
18371836
/// A buffer of length 2 is large enough to encode any `char`.
18381837
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
1839-
#[cfg_attr(
1840-
bootstrap,
1841-
rustc_const_stable(feature = "const_char_encode_utf16", since = "CURRENT_RUSTC_VERSION")
1842-
)]
18431838
#[doc(hidden)]
18441839
#[inline]
18451840
pub const fn encode_utf16_raw(mut code: u32, dst: &mut [u16]) -> &mut [u16] {

0 commit comments

Comments
 (0)