Skip to content

Commit ea1a0b8

Browse files
committed
update bootstrap configs
1 parent 0a361d0 commit ea1a0b8

File tree

25 files changed

+3
-95
lines changed

25 files changed

+3
-95
lines changed

alloc/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@
162162
//
163163
// Language features:
164164
// tidy-alphabetical-start
165-
#![cfg_attr(bootstrap, feature(const_mut_refs))]
166-
#![cfg_attr(bootstrap, feature(const_refs_to_cell))]
167165
#![cfg_attr(not(test), feature(coroutine_trait))]
168166
#![cfg_attr(test, feature(panic_update_hook))]
169167
#![cfg_attr(test, feature(test))]

alloc/tests/lib.rs

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 0 additions & 35 deletions
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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ pub const fn from_ref<T>(s: &T) -> &[T; 1] {
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")]
149149
#[rustc_const_stable(feature = "const_array_from_ref", since = "1.83.0")]
150-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,6 @@ 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))]
21852184
#[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

core/src/char/methods.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ impl char {
676676
#[stable(feature = "unicode_encode_char", since = "1.15.0")]
677677
#[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
}
@@ -1777,7 +1774,6 @@ const fn len_utf16(code: u32) -> usize {
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/intrinsics.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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`.

core/src/lib.rs

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,6 @@ impl<T> MaybeUninit<T> {
570570
/// until they are, it is advisable to avoid them.)
571571
#[stable(feature = "maybe_uninit", since = "1.36.0")]
572572
#[rustc_const_stable(feature = "const_maybe_uninit_as_mut_ptr", since = "1.83.0")]
573-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
574573
#[inline(always)]
575574
pub const fn as_mut_ptr(&mut self) -> *mut T {
576575
// `MaybeUninit` and `ManuallyDrop` are both `repr(transparent)` so we can cast the pointer.
@@ -910,7 +909,6 @@ impl<T> MaybeUninit<T> {
910909
/// };
911910
/// ```
912911
#[stable(feature = "maybe_uninit_ref", since = "1.55.0")]
913-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
914912
#[rustc_const_stable(
915913
feature = "const_maybe_uninit_assume_init",
916914
since = "CURRENT_RUSTC_VERSION"
@@ -1000,7 +998,6 @@ impl<T> MaybeUninit<T> {
1000998
///
1001999
/// [`assume_init_mut`]: MaybeUninit::assume_init_mut
10021000
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1003-
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
10041001
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10051002
#[inline(always)]
10061003
pub const unsafe fn slice_assume_init_mut(slice: &mut [Self]) -> &mut [T] {

0 commit comments

Comments
 (0)