Skip to content

Commit 6aa8763

Browse files
committed
update cfgs
1 parent 5b17832 commit 6aa8763

File tree

19 files changed

+28
-91
lines changed

19 files changed

+28
-91
lines changed

alloc/src/collections/vec_deque/into_iter.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
121121
{
122122
match self.try_fold(init, |b, item| Ok::<B, !>(f(b, item))) {
123123
Ok(b) => b,
124-
#[cfg(bootstrap)]
125-
Err(e) => match e {},
126124
}
127125
}
128126

@@ -243,8 +241,6 @@ impl<T, A: Allocator> DoubleEndedIterator for IntoIter<T, A> {
243241
{
244242
match self.try_rfold(init, |b, item| Ok::<B, !>(f(b, item))) {
245243
Ok(b) => b,
246-
#[cfg(bootstrap)]
247-
Err(e) => match e {},
248244
}
249245
}
250246
}

core/src/arch.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@
44
#[stable(feature = "simd_arch", since = "1.27.0")]
55
pub use crate::core_arch::arch::*;
66

7-
#[cfg(bootstrap)]
8-
#[allow(dead_code)]
9-
#[unstable(feature = "sha512_sm_x86", issue = "126624")]
10-
fn dummy() {
11-
// AArch64 also has a target feature named `sm4`, so we need `#![feature(sha512_sm_x86)]` in lib.rs
12-
// But as the bootstrap compiler doesn't know about this feature yet, we need to convert it to a
13-
// library feature until bootstrap gets bumped
14-
}
15-
167
/// Inline assembly.
178
///
189
/// Refer to [Rust By Example] for a usage guide and the [reference] for

core/src/cell.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ pub use once::OnceCell;
306306
/// See the [module-level documentation](self) for more.
307307
#[stable(feature = "rust1", since = "1.0.0")]
308308
#[repr(transparent)]
309-
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
309+
#[rustc_pub_transparent]
310310
pub struct Cell<T: ?Sized> {
311311
value: UnsafeCell<T>,
312312
}
@@ -2056,7 +2056,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
20562056
#[lang = "unsafe_cell"]
20572057
#[stable(feature = "rust1", since = "1.0.0")]
20582058
#[repr(transparent)]
2059-
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
2059+
#[rustc_pub_transparent]
20602060
pub struct UnsafeCell<T: ?Sized> {
20612061
value: T,
20622062
}
@@ -2299,7 +2299,7 @@ impl<T> UnsafeCell<*mut T> {
22992299
/// See [`UnsafeCell`] for details.
23002300
#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
23012301
#[repr(transparent)]
2302-
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
2302+
#[rustc_pub_transparent]
23032303
pub struct SyncUnsafeCell<T: ?Sized> {
23042304
value: UnsafeCell<T>,
23052305
}

core/src/clone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ pub trait Clone: Sized {
161161
#[must_use = "cloning is often expensive and is not expected to have side effects"]
162162
// Clone::clone is special because the compiler generates MIR to implement it for some types.
163163
// See InstanceKind::CloneShim.
164-
#[cfg_attr(not(bootstrap), lang = "clone_fn")]
164+
#[lang = "clone_fn"]
165165
fn clone(&self) -> Self;
166166

167167
/// Performs copy-assignment from `source`.

core/src/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ use crate::ascii::Char as AsciiChar;
103103
/// ```
104104
#[cfg_attr(not(test), rustc_diagnostic_item = "Default")]
105105
#[stable(feature = "rust1", since = "1.0.0")]
106-
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
106+
#[rustc_trivial_field_reads]
107107
pub trait Default: Sized {
108108
/// Returns the "default value" for a type.
109109
///

core/src/intrinsics.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,6 @@ pub const fn unlikely(b: bool) -> bool {
10201020
/// any safety invariants.
10211021
///
10221022
/// This intrinsic does not have a stable counterpart.
1023-
#[cfg(not(bootstrap))]
10241023
#[unstable(feature = "core_intrinsics", issue = "none")]
10251024
#[rustc_intrinsic]
10261025
#[rustc_nounwind]
@@ -1030,12 +1029,6 @@ pub fn select_unpredictable<T>(b: bool, true_val: T, false_val: T) -> T {
10301029
if b { true_val } else { false_val }
10311030
}
10321031

1033-
#[cfg(bootstrap)]
1034-
#[inline]
1035-
pub fn select_unpredictable<T>(b: bool, true_val: T, false_val: T) -> T {
1036-
if b { true_val } else { false_val }
1037-
}
1038-
10391032
extern "rust-intrinsic" {
10401033
/// Executes a breakpoint trap, for inspection by a debugger.
10411034
///

core/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
//
108108
// Library features:
109109
// tidy-alphabetical-start
110-
#![cfg_attr(bootstrap, feature(offset_of_nested))]
111110
#![feature(array_ptr_get)]
112111
#![feature(asm_experimental_arch)]
113112
#![feature(const_align_of_val)]
@@ -192,9 +191,6 @@
192191
//
193192
// Language features:
194193
// tidy-alphabetical-start
195-
#![cfg_attr(bootstrap, feature(asm_const))]
196-
#![cfg_attr(bootstrap, feature(const_fn_floating_point_arithmetic))]
197-
#![cfg_attr(bootstrap, feature(min_exhaustive_patterns))]
198194
#![feature(abi_unadjusted)]
199195
#![feature(adt_const_params)]
200196
#![feature(allow_internal_unsafe)]

core/src/marker.rs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ pub macro ConstParamTy($item:item) {
992992
/* compiler built-in */
993993
}
994994

995-
#[cfg_attr(not(bootstrap), lang = "unsized_const_param_ty")]
995+
#[lang = "unsized_const_param_ty"]
996996
#[unstable(feature = "unsized_const_params", issue = "95174")]
997997
#[diagnostic::on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
998998
/// A marker for types which can be used as types of `const` generic parameters.
@@ -1002,10 +1002,9 @@ pub macro ConstParamTy($item:item) {
10021002
pub trait UnsizedConstParamTy: StructuralPartialEq + Eq {}
10031003

10041004
/// Derive macro generating an impl of the trait `ConstParamTy`.
1005-
#[cfg(not(bootstrap))]
1006-
#[cfg_attr(not(bootstrap), rustc_builtin_macro)]
1007-
#[cfg_attr(not(bootstrap), allow_internal_unstable(unsized_const_params))]
1008-
#[cfg_attr(not(bootstrap), unstable(feature = "unsized_const_params", issue = "95174"))]
1005+
#[rustc_builtin_macro]
1006+
#[allow_internal_unstable(unsized_const_params)]
1007+
#[unstable(feature = "unsized_const_params", issue = "95174")]
10091008
pub macro UnsizedConstParamTy($item:item) {
10101009
/* compiler built-in */
10111010
}
@@ -1021,14 +1020,6 @@ marker_impls! {
10211020
(),
10221021
{T: ConstParamTy_, const N: usize} [T; N],
10231022
}
1024-
#[cfg(bootstrap)]
1025-
marker_impls! {
1026-
#[unstable(feature = "adt_const_params", issue = "95174")]
1027-
ConstParamTy_ for
1028-
str,
1029-
{T: ConstParamTy_} [T],
1030-
{T: ConstParamTy_ + ?Sized} &T,
1031-
}
10321023

10331024
marker_impls! {
10341025
#[unstable(feature = "unsized_const_params", issue = "95174")]

core/src/mem/manually_drop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use crate::ptr;
4747
#[lang = "manually_drop"]
4848
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
4949
#[repr(transparent)]
50-
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
50+
#[rustc_pub_transparent]
5151
pub struct ManuallyDrop<T: ?Sized> {
5252
value: T,
5353
}

core/src/mem/maybe_uninit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ use crate::{fmt, intrinsics, ptr, slice};
237237
#[lang = "maybe_uninit"]
238238
#[derive(Copy)]
239239
#[repr(transparent)]
240-
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
240+
#[rustc_pub_transparent]
241241
pub union MaybeUninit<T> {
242242
uninit: (),
243243
value: ManuallyDrop<T>,

0 commit comments

Comments
 (0)