Skip to content

Commit abc611f

Browse files
step cfg(bootstrap)
1 parent 78cd779 commit abc611f

File tree

16 files changed

+3
-113
lines changed

16 files changed

+3
-113
lines changed

alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@
165165
//
166166
// Language features:
167167
// tidy-alphabetical-start
168-
#![cfg_attr(bootstrap, feature(c_unwind))]
169168
#![cfg_attr(not(test), feature(coroutine_trait))]
170169
#![cfg_attr(test, feature(panic_update_hook))]
171170
#![cfg_attr(test, feature(test))]

core/src/char/methods.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ impl char {
223223
/// assert_eq!('❤', c);
224224
/// ```
225225
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
226-
#[rustc_const_stable(
227-
feature = "const_char_from_u32_unchecked",
228-
since = "1.81.0"
229-
)]
226+
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
230227
#[must_use]
231228
#[inline]
232229
pub const unsafe fn from_u32_unchecked(i: u32) -> char {

core/src/intrinsics.rs

-53
Original file line numberDiff line numberDiff line change
@@ -1017,45 +1017,6 @@ extern "rust-intrinsic" {
10171017
#[rustc_nounwind]
10181018
pub fn breakpoint();
10191019

1020-
#[cfg(bootstrap)]
1021-
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
1022-
#[rustc_safe_intrinsic]
1023-
#[rustc_nounwind]
1024-
pub fn size_of<T>() -> usize;
1025-
1026-
#[cfg(bootstrap)]
1027-
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
1028-
#[rustc_safe_intrinsic]
1029-
#[rustc_nounwind]
1030-
pub fn min_align_of<T>() -> usize;
1031-
1032-
#[cfg(bootstrap)]
1033-
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
1034-
#[rustc_nounwind]
1035-
pub fn pref_align_of<T>() -> usize;
1036-
1037-
#[cfg(bootstrap)]
1038-
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
1039-
#[rustc_nounwind]
1040-
pub fn size_of_val<T: ?Sized>(_: *const T) -> usize;
1041-
1042-
#[cfg(bootstrap)]
1043-
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
1044-
#[rustc_nounwind]
1045-
pub fn min_align_of_val<T: ?Sized>(_: *const T) -> usize;
1046-
1047-
#[cfg(bootstrap)]
1048-
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
1049-
#[rustc_safe_intrinsic]
1050-
#[rustc_nounwind]
1051-
pub fn type_name<T: ?Sized>() -> &'static str;
1052-
1053-
#[cfg(bootstrap)]
1054-
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
1055-
#[rustc_safe_intrinsic]
1056-
#[rustc_nounwind]
1057-
pub fn type_id<T: ?Sized + 'static>() -> u128;
1058-
10591020
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
10601021
/// This will statically either panic, or do nothing.
10611022
///
@@ -2385,12 +2346,6 @@ extern "rust-intrinsic" {
23852346
#[rustc_nounwind]
23862347
pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
23872348

2388-
#[cfg(bootstrap)]
2389-
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
2390-
#[rustc_safe_intrinsic]
2391-
#[rustc_nounwind]
2392-
pub fn variant_count<T>() -> usize;
2393-
23942349
/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
23952350
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
23962351
///
@@ -2768,7 +2723,6 @@ pub unsafe fn vtable_align(_ptr: *const ()) -> usize {
27682723
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
27692724
#[rustc_intrinsic]
27702725
#[rustc_intrinsic_must_be_overridden]
2771-
#[cfg(not(bootstrap))]
27722726
pub const fn size_of<T>() -> usize {
27732727
unreachable!()
27742728
}
@@ -2786,7 +2740,6 @@ pub const fn size_of<T>() -> usize {
27862740
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
27872741
#[rustc_intrinsic]
27882742
#[rustc_intrinsic_must_be_overridden]
2789-
#[cfg(not(bootstrap))]
27902743
pub const fn min_align_of<T>() -> usize {
27912744
unreachable!()
27922745
}
@@ -2800,7 +2753,6 @@ pub const fn min_align_of<T>() -> usize {
28002753
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
28012754
#[rustc_intrinsic]
28022755
#[rustc_intrinsic_must_be_overridden]
2803-
#[cfg(not(bootstrap))]
28042756
pub const unsafe fn pref_align_of<T>() -> usize {
28052757
unreachable!()
28062758
}
@@ -2819,7 +2771,6 @@ pub const unsafe fn pref_align_of<T>() -> usize {
28192771
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
28202772
#[rustc_intrinsic]
28212773
#[rustc_intrinsic_must_be_overridden]
2822-
#[cfg(not(bootstrap))]
28232774
pub const fn variant_count<T>() -> usize {
28242775
unreachable!()
28252776
}
@@ -2836,7 +2787,6 @@ pub const fn variant_count<T>() -> usize {
28362787
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
28372788
#[rustc_intrinsic]
28382789
#[rustc_intrinsic_must_be_overridden]
2839-
#[cfg(not(bootstrap))]
28402790
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28412791
unreachable!()
28422792
}
@@ -2853,7 +2803,6 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28532803
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
28542804
#[rustc_intrinsic]
28552805
#[rustc_intrinsic_must_be_overridden]
2856-
#[cfg(not(bootstrap))]
28572806
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28582807
unreachable!()
28592808
}
@@ -2871,7 +2820,6 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28712820
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
28722821
#[rustc_intrinsic]
28732822
#[rustc_intrinsic_must_be_overridden]
2874-
#[cfg(not(bootstrap))]
28752823
pub const fn type_name<T: ?Sized>() -> &'static str {
28762824
unreachable!()
28772825
}
@@ -2891,7 +2839,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
28912839
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
28922840
#[rustc_intrinsic]
28932841
#[rustc_intrinsic_must_be_overridden]
2894-
#[cfg(not(bootstrap))]
28952842
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
28962843
unreachable!()
28972844
}

core/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,6 @@
192192
//
193193
// Language features:
194194
// tidy-alphabetical-start
195-
#![cfg_attr(bootstrap, feature(c_unwind))]
196-
#![cfg_attr(bootstrap, feature(effects))]
197195
#![feature(abi_unadjusted)]
198196
#![feature(adt_const_params)]
199197
#![feature(allow_internal_unsafe)]

core/src/marker.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,6 @@ pub trait FnPtr: Copy + Clone {
10611061
}
10621062

10631063
/// Derive macro generating impls of traits related to smart pointers.
1064-
#[cfg(not(bootstrap))]
10651064
#[rustc_builtin_macro]
10661065
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
10671066
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
@@ -1079,7 +1078,6 @@ pub macro SmartPointer($item:item) {
10791078
reason = "internal module for implementing effects"
10801079
)]
10811080
#[allow(missing_debug_implementations)] // these unit structs don't need `Debug` impls.
1082-
#[cfg(not(bootstrap))]
10831081
pub mod effects {
10841082
#[lang = "EffectsNoRuntime"]
10851083
pub struct NoRuntime;

core/src/num/f128.rs

-20
Original file line numberDiff line numberDiff line change
@@ -234,24 +234,20 @@ impl f128 {
234234
/// This constant isn't guaranteed to equal to any specific NaN bitpattern,
235235
/// and the stability of its representation over Rust versions
236236
/// and target platforms isn't guaranteed.
237-
#[cfg(not(bootstrap))]
238237
#[allow(clippy::eq_op)]
239238
#[rustc_diagnostic_item = "f128_nan"]
240239
#[unstable(feature = "f128", issue = "116909")]
241240
pub const NAN: f128 = 0.0_f128 / 0.0_f128;
242241

243242
/// Infinity (∞).
244-
#[cfg(not(bootstrap))]
245243
#[unstable(feature = "f128", issue = "116909")]
246244
pub const INFINITY: f128 = 1.0_f128 / 0.0_f128;
247245

248246
/// Negative infinity (−∞).
249-
#[cfg(not(bootstrap))]
250247
#[unstable(feature = "f128", issue = "116909")]
251248
pub const NEG_INFINITY: f128 = -1.0_f128 / 0.0_f128;
252249

253250
/// Sign bit
254-
#[cfg(not(bootstrap))]
255251
pub(crate) const SIGN_MASK: u128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
256252

257253
/// Exponent mask
@@ -261,11 +257,9 @@ impl f128 {
261257
pub(crate) const MAN_MASK: u128 = 0x0000_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
262258

263259
/// Minimum representable positive value (min subnormal)
264-
#[cfg(not(bootstrap))]
265260
const TINY_BITS: u128 = 0x1;
266261

267262
/// Minimum representable negative value (min negative subnormal)
268-
#[cfg(not(bootstrap))]
269263
const NEG_TINY_BITS: u128 = Self::TINY_BITS | Self::SIGN_MASK;
270264

271265
/// Returns `true` if this value is NaN.
@@ -284,7 +278,6 @@ impl f128 {
284278
/// ```
285279
#[inline]
286280
#[must_use]
287-
#[cfg(not(bootstrap))]
288281
#[unstable(feature = "f128", issue = "116909")]
289282
#[allow(clippy::eq_op)] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
290283
pub const fn is_nan(self) -> bool {
@@ -295,7 +288,6 @@ impl f128 {
295288
// concerns about portability, so this implementation is for
296289
// private use internally.
297290
#[inline]
298-
#[cfg(not(bootstrap))]
299291
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
300292
pub(crate) const fn abs_private(self) -> f128 {
301293
// SAFETY: This transmutation is fine. Probably. For the reasons std is using it.
@@ -326,7 +318,6 @@ impl f128 {
326318
/// ```
327319
#[inline]
328320
#[must_use]
329-
#[cfg(not(bootstrap))]
330321
#[unstable(feature = "f128", issue = "116909")]
331322
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
332323
pub const fn is_infinite(self) -> bool {
@@ -354,7 +345,6 @@ impl f128 {
354345
/// ```
355346
#[inline]
356347
#[must_use]
357-
#[cfg(not(bootstrap))]
358348
#[unstable(feature = "f128", issue = "116909")]
359349
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
360350
pub const fn is_finite(self) -> bool {
@@ -389,7 +379,6 @@ impl f128 {
389379
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
390380
#[inline]
391381
#[must_use]
392-
#[cfg(not(bootstrap))]
393382
#[unstable(feature = "f128", issue = "116909")]
394383
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
395384
pub const fn is_subnormal(self) -> bool {
@@ -422,7 +411,6 @@ impl f128 {
422411
/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
423412
#[inline]
424413
#[must_use]
425-
#[cfg(not(bootstrap))]
426414
#[unstable(feature = "f128", issue = "116909")]
427415
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
428416
pub const fn is_normal(self) -> bool {
@@ -448,7 +436,6 @@ impl f128 {
448436
/// # }
449437
/// ```
450438
#[inline]
451-
#[cfg(not(bootstrap))]
452439
#[unstable(feature = "f128", issue = "116909")]
453440
#[rustc_const_unstable(feature = "const_float_classify", issue = "72505")]
454441
pub const fn classify(self) -> FpCategory {
@@ -557,7 +544,6 @@ impl f128 {
557544
/// [`MIN`]: Self::MIN
558545
/// [`MAX`]: Self::MAX
559546
#[inline]
560-
#[cfg(not(bootstrap))]
561547
#[unstable(feature = "f128", issue = "116909")]
562548
// #[unstable(feature = "float_next_up_down", issue = "91399")]
563549
pub fn next_up(self) -> Self {
@@ -612,7 +598,6 @@ impl f128 {
612598
/// [`MIN`]: Self::MIN
613599
/// [`MAX`]: Self::MAX
614600
#[inline]
615-
#[cfg(not(bootstrap))]
616601
#[unstable(feature = "f128", issue = "116909")]
617602
// #[unstable(feature = "float_next_up_down", issue = "91399")]
618603
pub fn next_down(self) -> Self {
@@ -649,7 +634,6 @@ impl f128 {
649634
/// # }
650635
/// ```
651636
#[inline]
652-
#[cfg(not(bootstrap))]
653637
#[unstable(feature = "f128", issue = "116909")]
654638
#[must_use = "this returns the result of the operation, without modifying the original"]
655639
pub fn recip(self) -> Self {
@@ -670,7 +654,6 @@ impl f128 {
670654
/// # }
671655
/// ```
672656
#[inline]
673-
#[cfg(not(bootstrap))]
674657
#[unstable(feature = "f128", issue = "116909")]
675658
#[must_use = "this returns the result of the operation, without modifying the original"]
676659
pub fn to_degrees(self) -> Self {
@@ -694,7 +677,6 @@ impl f128 {
694677
/// # }
695678
/// ```
696679
#[inline]
697-
#[cfg(not(bootstrap))]
698680
#[unstable(feature = "f128", issue = "116909")]
699681
#[must_use = "this returns the result of the operation, without modifying the original"]
700682
pub fn to_radians(self) -> f128 {
@@ -1141,7 +1123,6 @@ impl f128 {
11411123
/// ```
11421124
#[inline]
11431125
#[must_use]
1144-
#[cfg(not(bootstrap))]
11451126
#[unstable(feature = "f128", issue = "116909")]
11461127
pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
11471128
let mut left = self.to_bits() as i128;
@@ -1201,7 +1182,6 @@ impl f128 {
12011182
/// # }
12021183
/// ```
12031184
#[inline]
1204-
#[cfg(not(bootstrap))]
12051185
#[unstable(feature = "f128", issue = "116909")]
12061186
#[must_use = "method returns a new number and does not mutate the original value"]
12071187
pub fn clamp(mut self, min: f128, max: f128) -> f128 {

0 commit comments

Comments
 (0)