update cfgs · patricklam/verify-rust-std@349f8d5 (original) (raw)

19 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -121,8 +121,6 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
121 121 {
122 122 match self.try_fold(init, |b, item
123 123 Ok(b) => b,
124 -#[cfg(bootstrap)]
125 -Err(e) => match e {},
126 124 }
127 125 }
128 126
@@ -243,8 +241,6 @@ impl<T, A: Allocator> DoubleEndedIterator for IntoIter<T, A> {
243 241 {
244 242 match self.try_rfold(init, |b, item
245 243 Ok(b) => b,
246 -#[cfg(bootstrap)]
247 -Err(e) => match e {},
248 244 }
249 245 }
250 246 }
Original file line number Diff line number Diff line change
@@ -4,15 +4,6 @@
4 4 #[stable(feature = "simd_arch", since = "1.27.0")]
5 5 pub use crate::core_arch::arch::*;
6 6
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 -
16 7 /// Inline assembly.
17 8 ///
18 9 /// Refer to [Rust By Example] for a usage guide and the [reference] for
Original file line number Diff line number Diff line change
@@ -306,7 +306,7 @@ pub use once::OnceCell;
306 306 /// See the [module-level documentation](self) for more.
307 307 #[stable(feature = "rust1", since = "1.0.0")]
308 308 #[repr(transparent)]
309 -#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
309 +#[rustc_pub_transparent]
310 310 pub struct Cell<T: ?Sized> {
311 311 value: UnsafeCell<T>,
312 312 }
@@ -2056,7 +2056,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
2056 2056 #[lang = "unsafe_cell"]
2057 2057 #[stable(feature = "rust1", since = "1.0.0")]
2058 2058 #[repr(transparent)]
2059 -#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
2059 +#[rustc_pub_transparent]
2060 2060 pub struct UnsafeCell<T: ?Sized> {
2061 2061 value: T,
2062 2062 }
@@ -2299,7 +2299,7 @@ impl UnsafeCell<*mut T> {
2299 2299 /// See [`UnsafeCell`] for details.
2300 2300 #[unstable(feature = "sync_unsafe_cell", issue = "95439")]
2301 2301 #[repr(transparent)]
2302 -#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
2302 +#[rustc_pub_transparent]
2303 2303 pub struct SyncUnsafeCell<T: ?Sized> {
2304 2304 value: UnsafeCell<T>,
2305 2305 }
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ pub trait Clone: Sized {
161 161 #[must_use = "cloning is often expensive and is not expected to have side effects"]
162 162 // Clone::clone is special because the compiler generates MIR to implement it for some types.
163 163 // See InstanceKind::CloneShim.
164 -#[cfg_attr(not(bootstrap), lang = "clone_fn")]
164 +#[lang = "clone_fn"]
165 165 fn clone(&self) -> Self;
166 166
167 167 /// Performs copy-assignment from `source`.
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ use crate::ascii::Char as AsciiChar;
103 103 /// ```
104 104 #[cfg_attr(not(test), rustc_diagnostic_item = "Default")]
105 105 #[stable(feature = "rust1", since = "1.0.0")]
106 -#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
106 +#[rustc_trivial_field_reads]
107 107 pub trait Default: Sized {
108 108 /// Returns the "default value" for a type.
109 109 ///
Original file line number Diff line number Diff line change
@@ -1020,7 +1020,6 @@ pub const fn unlikely(b: bool) -> bool {
1020 1020 /// any safety invariants.
1021 1021 ///
1022 1022 /// This intrinsic does not have a stable counterpart.
1023 -#[cfg(not(bootstrap))]
1024 1023 #[unstable(feature = "core_intrinsics", issue = "none")]
1025 1024 #[rustc_intrinsic]
1026 1025 #[rustc_nounwind]
@@ -1030,12 +1029,6 @@ pub fn select_unpredictable(b: bool, true_val: T, false_val: T) -> T {
1030 1029 if b { true_val } else { false_val }
1031 1030 }
1032 1031
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 -
1039 1032 extern "rust-intrinsic" {
1040 1033 /// Executes a breakpoint trap, for inspection by a debugger.
1041 1034 ///
Original file line number Diff line number Diff line change
@@ -107,7 +107,6 @@
107 107 //
108 108 // Library features:
109 109 // tidy-alphabetical-start
110 -#![cfg_attr(bootstrap, feature(offset_of_nested))]
111 110 #![feature(array_ptr_get)]
112 111 #![feature(asm_experimental_arch)]
113 112 #![feature(const_align_of_val)]
@@ -192,9 +191,6 @@
192 191 //
193 192 // Language features:
194 193 // 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))]
198 194 #![feature(abi_unadjusted)]
199 195 #![feature(adt_const_params)]
200 196 #![feature(allow_internal_unsafe)]
Original file line number Diff line number Diff line change
@@ -992,7 +992,7 @@ pub macro ConstParamTy($item:item) {
992 992 /* compiler built-in */
993 993 }
994 994
995 -#[cfg_attr(not(bootstrap), lang = "unsized_const_param_ty")]
995 +#[lang = "unsized_const_param_ty"]
996 996 #[unstable(feature = "unsized_const_params", issue = "95174")]
997 997 #[diagnostic::on_unimplemented(message = "`{Self}` can't be used as a const parameter type")]
998 998 /// A marker for types which can be used as types of `const` generic parameters.
@@ -1002,10 +1002,9 @@ pub macro ConstParamTy($item:item) {
1002 1002 pub trait UnsizedConstParamTy: StructuralPartialEq + Eq {}
1003 1003
1004 1004 /// 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")]
1009 1008 pub macro UnsizedConstParamTy($item:item) {
1010 1009 /* compiler built-in */
1011 1010 }
@@ -1021,14 +1020,6 @@ marker_impls! {
1021 1020 (),
1022 1021 {T: ConstParamTy_, const N: usize} [T; N],
1023 1022 }
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 -}
1032 1023
1033 1024 marker_impls! {
1034 1025 #[unstable(feature = "unsized_const_params", issue = "95174")]
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ use crate::ptr;
47 47 #[lang = "manually_drop"]
48 48 #[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
49 49 #[repr(transparent)]
50 -#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
50 +#[rustc_pub_transparent]
51 51 pub struct ManuallyDrop<T: ?Sized> {
52 52 value: T,
53 53 }
Original file line number Diff line number Diff line change
@@ -237,7 +237,7 @@ use crate::{fmt, intrinsics, ptr, slice};
237 237 #[lang = "maybe_uninit"]
238 238 #[derive(Copy)]
239 239 #[repr(transparent)]
240 -#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
240 +#[rustc_pub_transparent]
241 241 pub union MaybeUninit<T> {
242 242 uninit: (),
243 243 value: ManuallyDrop<T>,