Skip to content

Commit f7b3231

Browse files
committed
Auto merge of rust-lang#131767 - cuviper:bump-stage0, r=Mark-Simulacrum
Bump bootstrap compiler to 1.83.0-beta.1 https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday
2 parents cdbd127 + 43f97fb commit f7b3231

38 files changed

+159
-260
lines changed

alloc/src/lib.rs

-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(const_mut_refs))]
167-
#![cfg_attr(bootstrap, feature(const_refs_to_cell))]
168166
#![cfg_attr(not(test), feature(coroutine_trait))]
169167
#![cfg_attr(test, feature(panic_update_hook))]
170168
#![cfg_attr(test, feature(test))]

alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(btree_extract_if)]
66
#![feature(cow_is_borrowed)]
77
#![feature(const_heap)]
8-
#![cfg_attr(bootstrap, feature(const_mut_refs))]
98
#![feature(const_try)]
109
#![feature(core_intrinsics)]
1110
#![feature(extract_if)]

alloc/tests/vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ fn test_from_iter_specialization_panic_during_iteration_drops() {
12881288
#[test]
12891289
#[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")]
12901290
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
1291-
#[cfg_attr(not(bootstrap), allow(static_mut_refs))]
1291+
#[allow(static_mut_refs)]
12921292
fn test_from_iter_specialization_panic_during_drop_doesnt_leak() {
12931293
static mut DROP_COUNTER_OLD: [usize; 5] = [0; 5];
12941294
static mut DROP_COUNTER_NEW: [usize; 2] = [0; 2];

core/src/arch.rs

-35
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
#[allow(unused_imports)]
44
#[stable(feature = "simd_arch", since = "1.27.0")]
55
pub use crate::core_arch::arch::*;
6-
#[unstable(feature = "naked_functions", issue = "90957")]
7-
#[cfg(bootstrap)]
8-
pub use crate::naked_asm;
96

107
/// Inline assembly.
118
///
@@ -20,37 +17,6 @@ pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
2017
/* compiler built-in */
2118
}
2219

23-
/// Inline assembly used in combination with `#[naked]` functions.
24-
///
25-
/// Refer to [Rust By Example] for a usage guide and the [reference] for
26-
/// detailed information about the syntax and available options.
27-
///
28-
/// [Rust By Example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
29-
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
30-
#[unstable(feature = "naked_functions", issue = "90957")]
31-
#[macro_export]
32-
#[cfg(bootstrap)]
33-
macro_rules! naked_asm {
34-
([$last:expr], [$($pushed:expr),*]) => {
35-
#[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
36-
{
37-
core::arch::asm!($($pushed),*, options(att_syntax, noreturn))
38-
}
39-
#[cfg(not(any(target_arch = "x86_64", target_arch = "x86")))]
40-
{
41-
core::arch::asm!($($pushed),* , $last, options(noreturn))
42-
}
43-
};
44-
45-
([$first:expr $(, $rest:expr)*], [$($pushed:expr),*]) => {
46-
naked_asm!([$($rest),*], [$($pushed,)* $first]);
47-
};
48-
49-
($($expr:expr),* $(,)?) => {
50-
naked_asm!([$($expr),*], []);
51-
};
52-
}
53-
5420
/// Inline assembly used in combination with `#[naked]` functions.
5521
///
5622
/// Refer to [Rust By Example] for a usage guide and the [reference] for
@@ -60,7 +26,6 @@ macro_rules! naked_asm {
6026
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
6127
#[unstable(feature = "naked_functions", issue = "90957")]
6228
#[rustc_builtin_macro]
63-
#[cfg(not(bootstrap))]
6429
pub macro naked_asm("assembly template", $(operands,)* $(options($(option),*))?) {
6530
/* compiler built-in */
6631
}

core/src/array/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] {
146146

147147
/// Converts a mutable reference to `T` into a mutable reference to an array of length 1 (without copying).
148148
#[stable(feature = "array_from_ref", since = "1.53.0")]
149-
#[rustc_const_stable(feature = "const_array_from_ref", since = "CURRENT_RUSTC_VERSION")]
150-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
149+
#[rustc_const_stable(feature = "const_array_from_ref", since = "1.83.0")]
151150
pub const fn from_mut<T>(s: &mut T) -> &mut [T; 1] {
152151
// SAFETY: Converting `&mut T` to `&mut [T; 1]` is sound.
153152
unsafe { &mut *(s as *mut T).cast::<[T; 1]>() }

core/src/cell.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ impl<T> Cell<T> {
515515
/// assert_eq!(five, 5);
516516
/// ```
517517
#[stable(feature = "move_cell", since = "1.17.0")]
518-
#[rustc_const_stable(feature = "const_cell_into_inner", since = "CURRENT_RUSTC_VERSION")]
518+
#[rustc_const_stable(feature = "const_cell_into_inner", since = "1.83.0")]
519519
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
520520
pub const fn into_inner(self) -> T {
521521
self.value.into_inner()
@@ -864,7 +864,7 @@ impl<T> RefCell<T> {
864864
/// let five = c.into_inner();
865865
/// ```
866866
#[stable(feature = "rust1", since = "1.0.0")]
867-
#[rustc_const_stable(feature = "const_cell_into_inner", since = "CURRENT_RUSTC_VERSION")]
867+
#[rustc_const_stable(feature = "const_cell_into_inner", since = "1.83.0")]
868868
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
869869
#[inline]
870870
pub const fn into_inner(self) -> T {
@@ -2108,7 +2108,7 @@ impl<T> UnsafeCell<T> {
21082108
/// ```
21092109
#[inline(always)]
21102110
#[stable(feature = "rust1", since = "1.0.0")]
2111-
#[rustc_const_stable(feature = "const_cell_into_inner", since = "CURRENT_RUSTC_VERSION")]
2111+
#[rustc_const_stable(feature = "const_cell_into_inner", since = "1.83.0")]
21122112
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
21132113
pub const fn into_inner(self) -> T {
21142114
self.value
@@ -2181,8 +2181,7 @@ impl<T: ?Sized> UnsafeCell<T> {
21812181
/// ```
21822182
#[inline(always)]
21832183
#[stable(feature = "unsafe_cell_get_mut", since = "1.50.0")]
2184-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
2185-
#[rustc_const_stable(feature = "const_unsafecell_get_mut", since = "CURRENT_RUSTC_VERSION")]
2184+
#[rustc_const_stable(feature = "const_unsafecell_get_mut", since = "1.83.0")]
21862185
pub const fn get_mut(&mut self) -> &mut T {
21872186
&mut self.value
21882187
}

core/src/cell/once.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl<T> OnceCell<T> {
309309
/// ```
310310
#[inline]
311311
#[stable(feature = "once_cell", since = "1.70.0")]
312-
#[rustc_const_stable(feature = "const_cell_into_inner", since = "CURRENT_RUSTC_VERSION")]
312+
#[rustc_const_stable(feature = "const_cell_into_inner", since = "1.83.0")]
313313
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
314314
pub const fn into_inner(self) -> Option<T> {
315315
// Because `into_inner` takes `self` by value, the compiler statically verifies

core/src/char/methods.rs

+3-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl char {
3636
/// let value_at_min = u32::from(char::MIN);
3737
/// assert_eq!(char::from_u32(value_at_min), Some('\0'));
3838
/// ```
39-
#[stable(feature = "char_min", since = "CURRENT_RUSTC_VERSION")]
39+
#[stable(feature = "char_min", since = "1.83.0")]
4040
pub const MIN: char = '\0';
4141

4242
/// The highest valid code point a `char` can have, `'\u{10FFFF}'`.
@@ -674,9 +674,8 @@ impl char {
674674
/// 'ß'.encode_utf8(&mut b);
675675
/// ```
676676
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
677-
#[rustc_const_stable(feature = "const_char_encode_utf8", since = "CURRENT_RUSTC_VERSION")]
677+
#[rustc_const_stable(feature = "const_char_encode_utf8", since = "1.83.0")]
678678
#[inline]
679-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
680679
pub const fn encode_utf8(self, dst: &mut [u8]) -> &mut str {
681680
// SAFETY: `char` is not a surrogate, so this is valid UTF-8.
682681
unsafe { from_utf8_unchecked_mut(encode_utf8_raw(self as u32, dst)) }
@@ -1284,7 +1283,6 @@ impl char {
12841283
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
12851284
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
12861285
#[inline]
1287-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
12881286
pub const fn make_ascii_uppercase(&mut self) {
12891287
*self = self.to_ascii_uppercase();
12901288
}
@@ -1311,7 +1309,6 @@ impl char {
13111309
#[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")]
13121310
#[rustc_const_stable(feature = "const_make_ascii", since = "CURRENT_RUSTC_VERSION")]
13131311
#[inline]
1314-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
13151312
pub const fn make_ascii_lowercase(&mut self) {
13161313
*self = self.to_ascii_lowercase();
13171314
}
@@ -1773,11 +1770,10 @@ const fn len_utf16(code: u32) -> usize {
17731770
/// Panics if the buffer is not large enough.
17741771
/// A buffer of length four is large enough to encode any `char`.
17751772
#[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
1776-
#[rustc_const_stable(feature = "const_char_encode_utf8", since = "CURRENT_RUSTC_VERSION")]
1773+
#[rustc_const_stable(feature = "const_char_encode_utf8", since = "1.83.0")]
17771774
#[doc(hidden)]
17781775
#[inline]
17791776
#[rustc_allow_const_fn_unstable(const_eval_select)]
1780-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
17811777
pub const fn encode_utf8_raw(code: u32, dst: &mut [u8]) -> &mut [u8] {
17821778
const fn panic_at_const(_code: u32, _len: usize, _dst_len: usize) {
17831779
// Note that we cannot format in constant expressions.

core/src/fmt/builders.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<'a, 'b: 'a> DebugTuple<'a, 'b> {
383383
/// "Foo(10, ..)",
384384
/// );
385385
/// ```
386-
#[stable(feature = "debug_more_non_exhaustive", since = "CURRENT_RUSTC_VERSION")]
386+
#[stable(feature = "debug_more_non_exhaustive", since = "1.83.0")]
387387
pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
388388
self.result = self.result.and_then(|_| {
389389
if self.fields > 0 {
@@ -626,7 +626,7 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
626626
/// "{1, 2, ..}",
627627
/// );
628628
/// ```
629-
#[stable(feature = "debug_more_non_exhaustive", since = "CURRENT_RUSTC_VERSION")]
629+
#[stable(feature = "debug_more_non_exhaustive", since = "1.83.0")]
630630
pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
631631
self.inner.result = self.inner.result.and_then(|_| {
632632
if self.inner.has_fields {
@@ -818,7 +818,7 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
818818
/// "[1, 2, ..]",
819819
/// );
820820
/// ```
821-
#[stable(feature = "debug_more_non_exhaustive", since = "CURRENT_RUSTC_VERSION")]
821+
#[stable(feature = "debug_more_non_exhaustive", since = "1.83.0")]
822822
pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
823823
self.inner.result.and_then(|_| {
824824
if self.inner.has_fields {
@@ -1146,7 +1146,7 @@ impl<'a, 'b: 'a> DebugMap<'a, 'b> {
11461146
/// r#"{"A": 10, "B": 11, ..}"#,
11471147
/// );
11481148
/// ```
1149-
#[stable(feature = "debug_more_non_exhaustive", since = "CURRENT_RUSTC_VERSION")]
1149+
#[stable(feature = "debug_more_non_exhaustive", since = "1.83.0")]
11501150
pub fn finish_non_exhaustive(&mut self) -> fmt::Result {
11511151
self.result = self.result.and_then(|_| {
11521152
assert!(!self.has_key, "attempted to finish a map with a partial entry");

core/src/intrinsics.rs

+10-14
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ extern "rust-intrinsic" {
10851085
/// it does not require an `unsafe` block.
10861086
/// Therefore, implementations must not require the user to uphold
10871087
/// any safety invariants.
1088-
#[rustc_const_stable(feature = "const_intrinsic_forget", since = "CURRENT_RUSTC_VERSION")]
1088+
#[rustc_const_stable(feature = "const_intrinsic_forget", since = "1.83.0")]
10891089
#[rustc_safe_intrinsic]
10901090
#[rustc_nounwind]
10911091
pub fn forget<T: ?Sized>(_: T);
@@ -1807,7 +1807,6 @@ extern "rust-intrinsic" {
18071807
/// is selected, and that may depend on optimization level and context, for
18081808
/// example.
18091809
#[rustc_nounwind]
1810-
#[cfg(not(bootstrap))]
18111810
pub fn fmuladdf16(a: f16, b: f16, c: f16) -> f16;
18121811
/// Returns `a * b + c` for `f32` values, non-deterministically executing
18131812
/// either a fused multiply-add or two operations with rounding of the
@@ -1820,7 +1819,6 @@ extern "rust-intrinsic" {
18201819
/// is selected, and that may depend on optimization level and context, for
18211820
/// example.
18221821
#[rustc_nounwind]
1823-
#[cfg(not(bootstrap))]
18241822
pub fn fmuladdf32(a: f32, b: f32, c: f32) -> f32;
18251823
/// Returns `a * b + c` for `f64` values, non-deterministically executing
18261824
/// either a fused multiply-add or two operations with rounding of the
@@ -1833,7 +1831,6 @@ extern "rust-intrinsic" {
18331831
/// is selected, and that may depend on optimization level and context, for
18341832
/// example.
18351833
#[rustc_nounwind]
1836-
#[cfg(not(bootstrap))]
18371834
pub fn fmuladdf64(a: f64, b: f64, c: f64) -> f64;
18381835
/// Returns `a * b + c` for `f128` values, non-deterministically executing
18391836
/// either a fused multiply-add or two operations with rounding of the
@@ -1846,7 +1843,6 @@ extern "rust-intrinsic" {
18461843
/// is selected, and that may depend on optimization level and context, for
18471844
/// example.
18481845
#[rustc_nounwind]
1849-
#[cfg(not(bootstrap))]
18501846
pub fn fmuladdf128(a: f128, b: f128, c: f128) -> f128;
18511847

18521848
/// Returns the largest integer less than or equal to an `f16`.
@@ -2541,7 +2537,7 @@ extern "rust-intrinsic" {
25412537
/// This intrinsic can *only* be called where the pointer is a local without
25422538
/// projections (`write_via_move(ptr, x)`, not `write_via_move(*ptr, x)`) so
25432539
/// that it trivially obeys runtime-MIR rules about derefs in operands.
2544-
#[rustc_const_stable(feature = "const_ptr_write", since = "CURRENT_RUSTC_VERSION")]
2540+
#[rustc_const_stable(feature = "const_ptr_write", since = "1.83.0")]
25452541
#[rustc_nounwind]
25462542
pub fn write_via_move<T>(ptr: *mut T, value: T);
25472543

@@ -3070,7 +3066,7 @@ pub const fn type_id<T: ?Sized + 'static>() -> u128 {
30703066
/// change the possible layouts of pointers.
30713067
#[rustc_nounwind]
30723068
#[unstable(feature = "core_intrinsics", issue = "none")]
3073-
#[rustc_const_stable(feature = "ptr_metadata_const", since = "CURRENT_RUSTC_VERSION")]
3069+
#[rustc_const_stable(feature = "ptr_metadata_const", since = "1.83.0")]
30743070
#[rustc_intrinsic]
30753071
#[rustc_intrinsic_must_be_overridden]
30763072
pub const fn aggregate_raw_ptr<P: AggregateRawPtr<D, Metadata = M>, D, M>(_data: D, _meta: M) -> P {
@@ -3095,7 +3091,7 @@ impl<P: ?Sized, T: ptr::Thin> AggregateRawPtr<*mut T> for *mut P {
30953091
/// This is used to implement functions like `ptr::metadata`.
30963092
#[rustc_nounwind]
30973093
#[unstable(feature = "core_intrinsics", issue = "none")]
3098-
#[rustc_const_stable(feature = "ptr_metadata_const", since = "CURRENT_RUSTC_VERSION")]
3094+
#[rustc_const_stable(feature = "ptr_metadata_const", since = "1.83.0")]
30993095
#[rustc_intrinsic]
31003096
#[rustc_intrinsic_must_be_overridden]
31013097
pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *const P) -> M {
@@ -3196,13 +3192,13 @@ pub const fn ptr_metadata<P: ptr::Pointee<Metadata = M> + ?Sized, M>(_ptr: *cons
31963192
#[doc(alias = "memcpy")]
31973193
#[stable(feature = "rust1", since = "1.0.0")]
31983194
#[rustc_allowed_through_unstable_modules]
3199-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
3195+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
32003196
#[inline(always)]
32013197
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
32023198
#[rustc_diagnostic_item = "ptr_copy_nonoverlapping"]
32033199
pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize) {
32043200
extern "rust-intrinsic" {
3205-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
3201+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
32063202
#[rustc_nounwind]
32073203
pub fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: usize);
32083204
}
@@ -3300,13 +3296,13 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
33003296
#[doc(alias = "memmove")]
33013297
#[stable(feature = "rust1", since = "1.0.0")]
33023298
#[rustc_allowed_through_unstable_modules]
3303-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
3299+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
33043300
#[inline(always)]
33053301
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33063302
#[rustc_diagnostic_item = "ptr_copy"]
33073303
pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
33083304
extern "rust-intrinsic" {
3309-
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "CURRENT_RUSTC_VERSION")]
3305+
#[rustc_const_stable(feature = "const_intrinsic_copy", since = "1.83.0")]
33103306
#[rustc_nounwind]
33113307
fn copy<T>(src: *const T, dst: *mut T, count: usize);
33123308
}
@@ -3381,13 +3377,13 @@ pub const unsafe fn copy<T>(src: *const T, dst: *mut T, count: usize) {
33813377
#[doc(alias = "memset")]
33823378
#[stable(feature = "rust1", since = "1.0.0")]
33833379
#[rustc_allowed_through_unstable_modules]
3384-
#[rustc_const_stable(feature = "const_ptr_write", since = "CURRENT_RUSTC_VERSION")]
3380+
#[rustc_const_stable(feature = "const_ptr_write", since = "1.83.0")]
33853381
#[inline(always)]
33863382
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
33873383
#[rustc_diagnostic_item = "ptr_write_bytes"]
33883384
pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
33893385
extern "rust-intrinsic" {
3390-
#[rustc_const_stable(feature = "const_ptr_write", since = "CURRENT_RUSTC_VERSION")]
3386+
#[rustc_const_stable(feature = "const_ptr_write", since = "1.83.0")]
33913387
#[rustc_nounwind]
33923388
fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
33933389
}

core/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@
173173
//
174174
// Language features:
175175
// tidy-alphabetical-start
176-
#![cfg_attr(bootstrap, feature(const_mut_refs))]
177-
#![cfg_attr(bootstrap, feature(const_refs_to_cell))]
178-
#![cfg_attr(bootstrap, feature(const_refs_to_static))]
179176
#![feature(abi_unadjusted)]
180177
#![feature(adt_const_params)]
181178
#![feature(allow_internal_unsafe)]

core/src/mem/maybe_uninit.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -569,11 +569,7 @@ impl<T> MaybeUninit<T> {
569569
/// (Notice that the rules around references to uninitialized data are not finalized yet, but
570570
/// until they are, it is advisable to avoid them.)
571571
#[stable(feature = "maybe_uninit", since = "1.36.0")]
572-
#[rustc_const_stable(
573-
feature = "const_maybe_uninit_as_mut_ptr",
574-
since = "CURRENT_RUSTC_VERSION"
575-
)]
576-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
572+
#[rustc_const_stable(feature = "const_maybe_uninit_as_mut_ptr", since = "1.83.0")]
577573
#[inline(always)]
578574
pub const fn as_mut_ptr(&mut self) -> *mut T {
579575
// `MaybeUninit` and `ManuallyDrop` are both `repr(transparent)` so we can cast the pointer.
@@ -913,7 +909,6 @@ impl<T> MaybeUninit<T> {
913909
/// };
914910
/// ```
915911
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
916-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
917912
#[rustc_const_stable(
918913
feature = "const_maybe_uninit_assume_init",
919914
since = "CURRENT_RUSTC_VERSION"
@@ -1003,7 +998,6 @@ impl<T> MaybeUninit<T> {
1003998
///
1004999
/// [`assume_init_mut`]: MaybeUninit::assume_init_mut
10051000
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1006-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
10071001
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10081002
#[inline(always)]
10091003
pub const unsafe fn slice_assume_init_mut(slice: &mut [Self]) -> &mut [T] {

core/src/mem/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,7 @@ pub fn take<T: Default>(dest: &mut T) -> T {
857857
#[inline]
858858
#[stable(feature = "rust1", since = "1.0.0")]
859859
#[must_use = "if you don't need the old value, you can just assign the new value directly"]
860-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
861-
#[rustc_const_stable(feature = "const_replace", since = "CURRENT_RUSTC_VERSION")]
860+
#[rustc_const_stable(feature = "const_replace", since = "1.83.0")]
862861
#[cfg_attr(not(test), rustc_diagnostic_item = "mem_replace")]
863862
pub const fn replace<T>(dest: &mut T, src: T) -> T {
864863
// It may be tempting to use `swap` to avoid `unsafe` here. Don't!

0 commit comments

Comments
 (0)