Skip to content

Commit 3abc694

Browse files
committed
Auto merge of rust-lang#137237 - cuviper:stage0, r=Mark-Simulacrum
Master bootstrap update https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday r? `@Mark-Simulacrum`
2 parents 97b3a66 + 2a68133 commit 3abc694

File tree

28 files changed

+44
-371
lines changed

28 files changed

+44
-371
lines changed

Diff for: alloc/src/boxed.rs

-10
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,13 @@ pub struct Box<
237237
/// the newly allocated memory. This is an intrinsic to avoid unnecessary copies.
238238
///
239239
/// This is the surface syntax for `box <expr>` expressions.
240-
#[cfg(not(bootstrap))]
241240
#[rustc_intrinsic]
242241
#[rustc_intrinsic_must_be_overridden]
243242
#[unstable(feature = "liballoc_internals", issue = "none")]
244243
pub fn box_new<T>(_x: T) -> Box<T> {
245244
unreachable!()
246245
}
247246

248-
/// Transition function for the next bootstrap bump.
249-
#[cfg(bootstrap)]
250-
#[unstable(feature = "liballoc_internals", issue = "none")]
251-
#[inline(always)]
252-
pub fn box_new<T>(x: T) -> Box<T> {
253-
#[rustc_box]
254-
Box::new(x)
255-
}
256-
257247
impl<T> Box<T> {
258248
/// Allocates memory on the heap and then places `x` into it.
259249
///

Diff for: alloc/src/slice.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub use core::slice::ArrayChunksMut;
2727
pub use core::slice::ArrayWindows;
2828
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
2929
pub use core::slice::EscapeAscii;
30-
#[stable(feature = "get_many_mut", since = "CURRENT_RUSTC_VERSION")]
30+
#[stable(feature = "get_many_mut", since = "1.86.0")]
3131
pub use core::slice::GetDisjointMutError;
3232
#[stable(feature = "slice_get_slice", since = "1.28.0")]
3333
pub use core::slice::SliceIndex;

Diff for: alloc/src/vec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2526,7 +2526,7 @@ impl<T, A: Allocator> Vec<T, A> {
25262526
/// assert_eq!(vec, [1, 2, 3]);
25272527
/// assert_eq!(vec.pop_if(pred), None);
25282528
/// ```
2529-
#[stable(feature = "vec_pop_if", since = "CURRENT_RUSTC_VERSION")]
2529+
#[stable(feature = "vec_pop_if", since = "1.86.0")]
25302530
pub fn pop_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option<T> {
25312531
let last = self.last_mut()?;
25322532
if predicate(last) { self.pop() } else { None }

Diff for: core/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ check-cfg = [
3232
'cfg(bootstrap)',
3333
'cfg(no_fp_fmt_parse)',
3434
'cfg(stdarch_intel_sde)',
35-
'cfg(target_arch, values("xtensa"))',
3635
# core use #[path] imports to portable-simd `core_simd` crate
3736
# and to stdarch `core_arch` crate which messes-up with Cargo list
3837
# of declared features, we therefor expect any feature cfg

Diff for: core/src/contracts.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Unstable module containing the unstable contracts lang items and attribute macros.
2-
#![cfg(not(bootstrap))]
32
43
pub use crate::macros::builtin::{contracts_ensures as ensures, contracts_requires as requires};
54

Diff for: core/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1099,5 +1099,5 @@ impl Error for crate::time::TryFromFloatSecsError {}
10991099
#[stable(feature = "cstr_from_bytes_until_nul", since = "1.69.0")]
11001100
impl Error for crate::ffi::FromBytesUntilNulError {}
11011101

1102-
#[stable(feature = "get_many_mut", since = "CURRENT_RUSTC_VERSION")]
1102+
#[stable(feature = "get_many_mut", since = "1.86.0")]
11031103
impl Error for crate::slice::GetDisjointMutError {}

Diff for: core/src/hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ pub fn spin_loop() {
472472
/// During constant evaluation, `black_box` is treated as a no-op.
473473
#[inline]
474474
#[stable(feature = "bench_black_box", since = "1.66.0")]
475-
#[rustc_const_stable(feature = "const_black_box", since = "CURRENT_RUSTC_VERSION")]
475+
#[rustc_const_stable(feature = "const_black_box", since = "1.86.0")]
476476
pub const fn black_box<T>(dummy: T) -> T {
477477
crate::intrinsics::black_box(dummy)
478478
}

Diff for: core/src/intrinsics/mod.rs

+6-29
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ pub mod simd;
7878
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
7979

8080
#[stable(feature = "drop_in_place", since = "1.8.0")]
81-
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
82-
#[cfg_attr(
83-
not(bootstrap),
84-
rustc_allowed_through_unstable_modules = "import this function via `std::ptr` instead"
85-
)]
81+
#[rustc_allowed_through_unstable_modules = "import this function via `std::ptr` instead"]
8682
#[deprecated(note = "no longer an intrinsic - use `ptr::drop_in_place` directly", since = "1.52.0")]
8783
#[inline]
8884
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
@@ -1901,11 +1897,7 @@ pub const fn forget<T: ?Sized>(_: T) {
19011897
/// }
19021898
/// ```
19031899
#[stable(feature = "rust1", since = "1.0.0")]
1904-
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
1905-
#[cfg_attr(
1906-
not(bootstrap),
1907-
rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
1908-
)]
1900+
#[rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"]
19091901
#[rustc_const_stable(feature = "const_transmute", since = "1.56.0")]
19101902
#[rustc_diagnostic_item = "transmute"]
19111903
#[rustc_nounwind]
@@ -3260,7 +3252,7 @@ pub const fn three_way_compare<T: Copy>(_lhs: T, _rhss: T) -> crate::cmp::Orderi
32603252
/// Otherwise it's immediate UB.
32613253
#[rustc_const_unstable(feature = "disjoint_bitor", issue = "135758")]
32623254
#[rustc_nounwind]
3263-
#[cfg_attr(not(bootstrap), rustc_intrinsic)]
3255+
#[rustc_intrinsic]
32643256
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32653257
#[miri::intrinsic_fallback_is_spec] // the fallbacks all `assume` to tell Miri
32663258
pub const unsafe fn disjoint_bitor<T: ~const fallback::DisjointBitOr>(a: T, b: T) -> T {
@@ -4071,7 +4063,6 @@ pub const unsafe fn const_deallocate(_ptr: *mut u8, _size: usize, _align: usize)
40714063
/// of not prematurely commiting at compile-time to whether contract
40724064
/// checking is turned on, so that we can specify contracts in libstd
40734065
/// and let an end user opt into turning them on.
4074-
#[cfg(not(bootstrap))]
40754066
#[rustc_const_unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
40764067
#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
40774068
#[inline(always)]
@@ -4087,7 +4078,6 @@ pub const fn contract_checks() -> bool {
40874078
///
40884079
/// By default, if `contract_checks` is enabled, this will panic with no unwind if the condition
40894080
/// returns false.
4090-
#[cfg(not(bootstrap))]
40914081
#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
40924082
#[lang = "contract_check_requires"]
40934083
#[rustc_intrinsic]
@@ -4102,7 +4092,6 @@ pub fn contract_check_requires<C: Fn() -> bool>(cond: C) {
41024092
///
41034093
/// By default, if `contract_checks` is enabled, this will panic with no unwind if the condition
41044094
/// returns false.
4105-
#[cfg(not(bootstrap))]
41064095
#[unstable(feature = "contracts_internals", issue = "128044" /* compiler-team#759 */)]
41074096
#[rustc_intrinsic]
41084097
pub fn contract_check_ensures<'a, Ret, C: Fn(&'a Ret) -> bool>(ret: &'a Ret, cond: C) {
@@ -4401,11 +4390,7 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
44014390
/// [`Vec::append`]: ../../std/vec/struct.Vec.html#method.append
44024391
#[doc(alias = "memcpy")]
44034392
#[stable(feature = "rust1", since = "1.0.0")]
4404-
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
4405-
#[cfg_attr(
4406-
not(bootstrap),
4407-
rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4408-
)]
4393+
#[rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"]
44094394
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
44104395
#[inline(always)]
44114396
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -4509,11 +4494,7 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
45094494
/// ```
45104495
#[doc(alias = "memmove")]
45114496
#[stable(feature = "rust1", since = "1.0.0")]
4512-
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
4513-
#[cfg_attr(
4514-
not(bootstrap),
4515-
rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4516-
)]
4497+
#[rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"]
45174498
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
45184499
#[inline(always)]
45194500
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
@@ -4596,11 +4577,7 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
45964577
/// ```
45974578
#[doc(alias = "memset")]
45984579
#[stable(feature = "rust1", since = "1.0.0")]
4599-
#[cfg_attr(bootstrap, rustc_allowed_through_unstable_modules)]
4600-
#[cfg_attr(
4601-
not(bootstrap),
4602-
rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"
4603-
)]
4580+
#[rustc_allowed_through_unstable_modules = "import this function via `std::mem` instead"]
46044581
#[rustc_const_stable(feature = "const_ptr_write", since = "1.83.0")]
46054582
#[inline(always)]
46064583
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces

Diff for: core/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ pub mod autodiff {
247247
pub use crate::macros::builtin::autodiff;
248248
}
249249

250-
#[cfg(not(bootstrap))]
251250
#[unstable(feature = "contracts", issue = "128044")]
252251
pub mod contracts;
253252

Diff for: core/src/macros/mod.rs

-92
Original file line numberDiff line numberDiff line change
@@ -196,95 +196,6 @@ pub macro assert_matches {
196196
},
197197
}
198198

199-
/// A macro for defining `#[cfg]` match-like statements.
200-
///
201-
/// It is similar to the `if/elif` C preprocessor macro by allowing definition of a cascade of
202-
/// `#[cfg]` cases, emitting the implementation which matches first.
203-
///
204-
/// This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
205-
/// without having to rewrite each clause multiple times.
206-
///
207-
/// Trailing `_` wildcard match arms are **optional** and they indicate a fallback branch when
208-
/// all previous declarations do not evaluate to true.
209-
///
210-
/// # Example
211-
///
212-
/// ```
213-
/// #![feature(cfg_match)]
214-
///
215-
/// cfg_match! {
216-
/// cfg(unix) => {
217-
/// fn foo() { /* unix specific functionality */ }
218-
/// }
219-
/// cfg(target_pointer_width = "32") => {
220-
/// fn foo() { /* non-unix, 32-bit functionality */ }
221-
/// }
222-
/// _ => {
223-
/// fn foo() { /* fallback implementation */ }
224-
/// }
225-
/// }
226-
/// ```
227-
#[cfg(bootstrap)]
228-
#[unstable(feature = "cfg_match", issue = "115585")]
229-
#[rustc_diagnostic_item = "cfg_match"]
230-
pub macro cfg_match {
231-
// with a final wildcard
232-
(
233-
$(cfg($initial_meta:meta) => { $($initial_tokens:tt)* })+
234-
_ => { $($extra_tokens:tt)* }
235-
) => {
236-
cfg_match! {
237-
@__items ();
238-
$((($initial_meta) ($($initial_tokens)*)),)+
239-
(() ($($extra_tokens)*)),
240-
}
241-
},
242-
243-
// without a final wildcard
244-
(
245-
$(cfg($extra_meta:meta) => { $($extra_tokens:tt)* })*
246-
) => {
247-
cfg_match! {
248-
@__items ();
249-
$((($extra_meta) ($($extra_tokens)*)),)*
250-
}
251-
},
252-
253-
// Internal and recursive macro to emit all the items
254-
//
255-
// Collects all the previous cfgs in a list at the beginning, so they can be
256-
// negated. After the semicolon is all the remaining items.
257-
(@__items ($($_:meta,)*);) => {},
258-
(
259-
@__items ($($no:meta,)*);
260-
(($($yes:meta)?) ($($tokens:tt)*)),
261-
$($rest:tt,)*
262-
) => {
263-
// Emit all items within one block, applying an appropriate #[cfg]. The
264-
// #[cfg] will require all `$yes` matchers specified and must also negate
265-
// all previous matchers.
266-
#[cfg(all(
267-
$($yes,)?
268-
not(any($($no),*))
269-
))]
270-
cfg_match! { @__identity $($tokens)* }
271-
272-
// Recurse to emit all other items in `$rest`, and when we do so add all
273-
// our `$yes` matchers to the list of `$no` matchers as future emissions
274-
// will have to negate everything we just matched as well.
275-
cfg_match! {
276-
@__items ($($no,)* $($yes,)?);
277-
$($rest,)*
278-
}
279-
},
280-
281-
// Internal macro to make __apply work out right for different match types,
282-
// because of how macros match/expand stuff.
283-
(@__identity $($tokens:tt)*) => {
284-
$($tokens)*
285-
}
286-
}
287-
288199
/// A macro for defining `#[cfg]` match-like statements.
289200
///
290201
/// It is similar to the `if/elif` C preprocessor macro by allowing definition of a cascade of
@@ -324,7 +235,6 @@ pub macro cfg_match {
324235
/// _ => { "Behind every successful diet is an unwatched pizza" }
325236
/// }};
326237
/// ```
327-
#[cfg(not(bootstrap))]
328238
#[unstable(feature = "cfg_match", issue = "115585")]
329239
#[rustc_diagnostic_item = "cfg_match"]
330240
pub macro cfg_match {
@@ -1782,7 +1692,6 @@ pub(crate) mod builtin {
17821692
/// The attribute carries an argument token-tree which is
17831693
/// eventually parsed as a unary closure expression that is
17841694
/// invoked on a reference to the return value.
1785-
#[cfg(not(bootstrap))]
17861695
#[unstable(feature = "contracts", issue = "128044")]
17871696
#[allow_internal_unstable(contracts_internals)]
17881697
#[rustc_builtin_macro]
@@ -1795,7 +1704,6 @@ pub(crate) mod builtin {
17951704
/// The attribute carries an argument token-tree which is
17961705
/// eventually parsed as an boolean expression with access to the
17971706
/// function's formal parameters
1798-
#[cfg(not(bootstrap))]
17991707
#[unstable(feature = "contracts", issue = "128044")]
18001708
#[allow_internal_unstable(contracts_internals)]
18011709
#[rustc_builtin_macro]

Diff for: core/src/marker.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ impl<T: ?Sized> Copy for &T {}
467467
///
468468
/// Bikeshed name for now.
469469
#[unstable(feature = "bikeshed_guaranteed_no_drop", issue = "none")]
470-
#[cfg_attr(not(bootstrap), lang = "bikeshed_guaranteed_no_drop")]
470+
#[lang = "bikeshed_guaranteed_no_drop"]
471471
pub trait BikeshedGuaranteedNoDrop {}
472472

473473
/// Types for which it is safe to share references between threads.
@@ -1313,7 +1313,6 @@ pub macro CoercePointee($item:item) {
13131313
///
13141314
/// This trait is not intended to be implemented by users or used other than
13151315
/// validation, so it should never be stabilized.
1316-
#[cfg(not(bootstrap))]
13171316
#[lang = "coerce_pointee_validated"]
13181317
#[unstable(feature = "coerce_pointee_validated", issue = "none")]
13191318
#[doc(hidden)]

Diff for: core/src/num/f32.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ impl f32 {
741741
/// [`MAX`]: Self::MAX
742742
#[inline]
743743
#[doc(alias = "nextUp")]
744-
#[stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
745-
#[rustc_const_stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
744+
#[stable(feature = "float_next_up_down", since = "1.86.0")]
745+
#[rustc_const_stable(feature = "float_next_up_down", since = "1.86.0")]
746746
pub const fn next_up(self) -> Self {
747747
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
748748
// denormals to zero. This is in general unsound and unsupported, but here
@@ -792,8 +792,8 @@ impl f32 {
792792
/// [`MAX`]: Self::MAX
793793
#[inline]
794794
#[doc(alias = "nextDown")]
795-
#[stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
796-
#[rustc_const_stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
795+
#[stable(feature = "float_next_up_down", since = "1.86.0")]
796+
#[rustc_const_stable(feature = "float_next_up_down", since = "1.86.0")]
797797
pub const fn next_down(self) -> Self {
798798
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
799799
// denormals to zero. This is in general unsound and unsupported, but here

Diff for: core/src/num/f64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ impl f64 {
758758
/// [`MAX`]: Self::MAX
759759
#[inline]
760760
#[doc(alias = "nextUp")]
761-
#[stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
762-
#[rustc_const_stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
761+
#[stable(feature = "float_next_up_down", since = "1.86.0")]
762+
#[rustc_const_stable(feature = "float_next_up_down", since = "1.86.0")]
763763
pub const fn next_up(self) -> Self {
764764
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
765765
// denormals to zero. This is in general unsound and unsupported, but here
@@ -809,8 +809,8 @@ impl f64 {
809809
/// [`MAX`]: Self::MAX
810810
#[inline]
811811
#[doc(alias = "nextDown")]
812-
#[stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
813-
#[rustc_const_stable(feature = "float_next_up_down", since = "CURRENT_RUSTC_VERSION")]
812+
#[stable(feature = "float_next_up_down", since = "1.86.0")]
813+
#[rustc_const_stable(feature = "float_next_up_down", since = "1.86.0")]
814814
pub const fn next_down(self) -> Self {
815815
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
816816
// denormals to zero. This is in general unsound and unsupported, but here

Diff for: core/src/num/nonzero.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ macro_rules! nonzero_integer {
689689
/// # }
690690
/// ```
691691
///
692-
#[stable(feature = "non_zero_count_ones", since = "CURRENT_RUSTC_VERSION")]
693-
#[rustc_const_stable(feature = "non_zero_count_ones", since = "CURRENT_RUSTC_VERSION")]
692+
#[stable(feature = "non_zero_count_ones", since = "1.86.0")]
693+
#[rustc_const_stable(feature = "non_zero_count_ones", since = "1.86.0")]
694694
#[doc(alias = "popcount")]
695695
#[doc(alias = "popcnt")]
696696
#[must_use = "this returns the result of the operation, \

Diff for: core/src/panicking.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ fn panic_misaligned_pointer_dereference(required: usize, found: usize) -> ! {
294294
#[cfg_attr(not(feature = "panic_immediate_abort"), inline(never), cold, optimize(size))]
295295
#[cfg_attr(feature = "panic_immediate_abort", inline)]
296296
#[track_caller]
297-
#[cfg_attr(not(bootstrap), lang = "panic_null_pointer_dereference")] // needed by codegen for panic on null pointer deref
297+
#[lang = "panic_null_pointer_dereference"] // needed by codegen for panic on null pointer deref
298298
#[rustc_nounwind] // `CheckNull` MIR pass requires this function to never unwind
299299
fn panic_null_pointer_dereference() -> ! {
300300
if cfg!(feature = "panic_immediate_abort") {

0 commit comments

Comments
 (0)