@@ -2389,7 +2389,6 @@ pub const fn bitreverse<T: Copy>(_x: T) -> T {
23892389/// large and difficult to optimize.
23902390///
23912391/// The stabilized version of this intrinsic is [`Ord::cmp`].
2392- #[ rustc_const_unstable( feature = "const_three_way_compare" , issue = "none" ) ]
23932392#[ rustc_intrinsic]
23942393#[ rustc_intrinsic_must_be_overridden]
23952394pub const fn three_way_compare < T : Copy > ( _lhs : T , _rhss : T ) -> crate :: cmp:: Ordering {
@@ -2457,7 +2456,7 @@ pub const fn mul_with_overflow<T: Copy>(_x: T, _y: T) -> (T, bool) {
24572456/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
24582457///
24592458/// This intrinsic does not have a stable counterpart.
2460- #[ rustc_const_unstable( feature = "const_exact_div" , issue = "none" ) ]
2459+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_exact_div" , issue = "none" ) ) ]
24612460#[ rustc_nounwind]
24622461#[ rustc_intrinsic]
24632462#[ rustc_intrinsic_must_be_overridden]
@@ -2784,7 +2783,7 @@ pub const unsafe fn ptr_offset_from<T>(_ptr: *const T, _base: *const T) -> isize
27842783}
27852784
27862785/// See documentation of `<*const T>::sub_ptr` for details.
2787- #[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
2786+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ) ]
27882787#[ rustc_nounwind]
27892788#[ rustc_intrinsic]
27902789#[ rustc_intrinsic_must_be_overridden]
@@ -2796,8 +2795,7 @@ pub const unsafe fn ptr_offset_from_unsigned<T>(_ptr: *const T, _base: *const T)
27962795/// Returns `2` if the result is unknown.
27972796/// Returns `1` if the pointers are guaranteed equal
27982797/// Returns `0` if the pointers are guaranteed inequal
2799- #[ rustc_const_unstable( feature = "const_raw_ptr_comparison" , issue = "53020" ) ]
2800- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
2798+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_raw_ptr_comparison" , issue = "53020" ) ) ]
28012799#[ rustc_intrinsic]
28022800#[ rustc_nounwind]
28032801#[ rustc_do_not_const_check]
@@ -2830,7 +2828,7 @@ pub const fn ptr_guaranteed_cmp<T>(ptr: *const T, other: *const T) -> u8 {
28302828///
28312829/// (The implementation is allowed to branch on the results of comparisons,
28322830/// which is UB if any of their inputs are `undef`.)
2833- #[ rustc_const_unstable( feature = "const_intrinsic_raw_eq" , issue = "none" ) ]
2831+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_intrinsic_raw_eq" , issue = "none" ) ) ]
28342832#[ rustc_nounwind]
28352833#[ rustc_intrinsic]
28362834#[ rustc_intrinsic_must_be_overridden]
@@ -2852,7 +2850,7 @@ pub const unsafe fn raw_eq<T>(_a: &T, _b: &T) -> bool {
28522850/// that differs. That allows optimizations that can read in large chunks.
28532851///
28542852/// [valid]: crate::ptr#safety
2855- #[ rustc_const_unstable( feature = "const_intrinsic_compare_bytes" , issue = "none" ) ]
2853+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_intrinsic_compare_bytes" , issue = "none" ) ) ]
28562854#[ rustc_nounwind]
28572855#[ rustc_intrinsic]
28582856#[ rustc_intrinsic_must_be_overridden]
@@ -2863,7 +2861,7 @@ pub const unsafe fn compare_bytes(_left: *const u8, _right: *const u8, _bytes: u
28632861/// See documentation of [`std::hint::black_box`] for details.
28642862///
28652863/// [`std::hint::black_box`]: crate::hint::black_box
2866- #[ rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ]
2864+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ) ]
28672865#[ rustc_nounwind]
28682866#[ rustc_intrinsic]
28692867#[ rustc_intrinsic_must_be_overridden]
@@ -3036,7 +3034,7 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
30363034#[ rustc_nounwind]
30373035#[ inline]
30383036#[ rustc_intrinsic]
3039- // This has fallback `const fn` MIR, so shouldn't need stability, see #122652
3037+ // Unstable because `swap_nonoverlapping` is unstable.
30403038#[ rustc_const_unstable( feature = "const_typed_swap" , issue = "none" ) ]
30413039pub const unsafe fn typed_swap < T > ( x : * mut T , y : * mut T ) {
30423040 // SAFETY: The caller provided single non-overlapping items behind
@@ -3059,7 +3057,6 @@ pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
30593057/// primarily used by [`ub_checks::assert_unsafe_precondition`].
30603058#[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ) ]
30613059#[ cfg_attr( not( bootstrap) , rustc_const_stable_intrinsic) ] // just for UB checks
3062- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
30633060#[ inline( always) ]
30643061#[ rustc_intrinsic]
30653062pub const fn ub_checks ( ) -> bool {
@@ -3075,7 +3072,6 @@ pub const fn ub_checks() -> bool {
30753072/// - At compile time, a compile error occurs if this constraint is violated.
30763073/// - At runtime, it is not checked.
30773074#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
3078- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
30793075#[ rustc_nounwind]
30803076#[ rustc_intrinsic]
30813077#[ miri:: intrinsic_fallback_is_spec]
@@ -3175,7 +3171,7 @@ pub const fn min_align_of<T>() -> usize {
31753171/// It's "tracking issue" is [#91971](https://github.com/rust-lang/rust/issues/91971).
31763172#[ rustc_nounwind]
31773173#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3178- #[ rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ]
3174+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ) ]
31793175#[ rustc_intrinsic]
31803176#[ rustc_intrinsic_must_be_overridden]
31813177pub const unsafe fn pref_align_of < T > ( ) -> usize {
@@ -3193,7 +3189,7 @@ pub const unsafe fn pref_align_of<T>() -> usize {
31933189/// The to-be-stabilized version of this intrinsic is [`crate::mem::variant_count`].
31943190#[ rustc_nounwind]
31953191#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3196- #[ rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ]
3192+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ) ]
31973193#[ rustc_intrinsic]
31983194#[ rustc_intrinsic_must_be_overridden]
31993195pub const fn variant_count < T > ( ) -> usize {
@@ -3209,7 +3205,7 @@ pub const fn variant_count<T>() -> usize {
32093205/// See [`crate::mem::size_of_val_raw`] for safety conditions.
32103206#[ rustc_nounwind]
32113207#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3212- #[ rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ]
3208+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ) ]
32133209#[ rustc_intrinsic]
32143210#[ rustc_intrinsic_must_be_overridden]
32153211pub const unsafe fn size_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3225,7 +3221,7 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
32253221/// See [`crate::mem::align_of_val_raw`] for safety conditions.
32263222#[ rustc_nounwind]
32273223#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3228- #[ rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ]
3224+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ) ]
32293225#[ rustc_intrinsic]
32303226#[ rustc_intrinsic_must_be_overridden]
32313227pub const unsafe fn min_align_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3242,7 +3238,7 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
32423238/// The stabilized version of this intrinsic is [`core::any::type_name`].
32433239#[ rustc_nounwind]
32443240#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3245- #[ rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ]
3241+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ) ]
32463242#[ rustc_intrinsic]
32473243#[ rustc_intrinsic_must_be_overridden]
32483244pub const fn type_name < T : ?Sized > ( ) -> & ' static str {
@@ -3261,7 +3257,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
32613257/// The stabilized version of this intrinsic is [`core::any::TypeId::of`].
32623258#[ rustc_nounwind]
32633259#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3264- #[ rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ]
3260+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ) ]
32653261#[ rustc_intrinsic]
32663262#[ rustc_intrinsic_must_be_overridden]
32673263pub const fn type_id < T : ?Sized + ' static > ( ) -> u128 {
@@ -3636,8 +3632,7 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
36363632/// The stabilized version of this intrinsic is
36373633/// [`f16::min`]
36383634#[ rustc_nounwind]
3639- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3640- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3635+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
36413636#[ rustc_intrinsic]
36423637#[ rustc_intrinsic_must_be_overridden]
36433638pub const fn minnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3654,7 +3649,7 @@ pub const fn minnumf16(_x: f16, _y: f16) -> f16 {
36543649/// The stabilized version of this intrinsic is
36553650/// [`f32::min`]
36563651#[ rustc_nounwind]
3657- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3652+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
36583653#[ rustc_intrinsic]
36593654#[ rustc_intrinsic_must_be_overridden]
36603655pub const fn minnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3671,7 +3666,7 @@ pub const fn minnumf32(_x: f32, _y: f32) -> f32 {
36713666/// The stabilized version of this intrinsic is
36723667/// [`f64::min`]
36733668#[ rustc_nounwind]
3674- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3669+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
36753670#[ rustc_intrinsic]
36763671#[ rustc_intrinsic_must_be_overridden]
36773672pub const fn minnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3688,8 +3683,7 @@ pub const fn minnumf64(_x: f64, _y: f64) -> f64 {
36883683/// The stabilized version of this intrinsic is
36893684/// [`f128::min`]
36903685#[ rustc_nounwind]
3691- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3692- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3686+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
36933687#[ rustc_intrinsic]
36943688#[ rustc_intrinsic_must_be_overridden]
36953689pub const fn minnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3706,8 +3700,7 @@ pub const fn minnumf128(_x: f128, _y: f128) -> f128 {
37063700/// The stabilized version of this intrinsic is
37073701/// [`f16::max`]
37083702#[ rustc_nounwind]
3709- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3710- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3703+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
37113704#[ rustc_intrinsic]
37123705#[ rustc_intrinsic_must_be_overridden]
37133706pub const fn maxnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3724,7 +3717,7 @@ pub const fn maxnumf16(_x: f16, _y: f16) -> f16 {
37243717/// The stabilized version of this intrinsic is
37253718/// [`f32::max`]
37263719#[ rustc_nounwind]
3727- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3720+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
37283721#[ rustc_intrinsic]
37293722#[ rustc_intrinsic_must_be_overridden]
37303723pub const fn maxnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3741,7 +3734,7 @@ pub const fn maxnumf32(_x: f32, _y: f32) -> f32 {
37413734/// The stabilized version of this intrinsic is
37423735/// [`f64::max`]
37433736#[ rustc_nounwind]
3744- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3737+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
37453738#[ rustc_intrinsic]
37463739#[ rustc_intrinsic_must_be_overridden]
37473740pub const fn maxnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3758,8 +3751,7 @@ pub const fn maxnumf64(_x: f64, _y: f64) -> f64 {
37583751/// The stabilized version of this intrinsic is
37593752/// [`f128::max`]
37603753#[ rustc_nounwind]
3761- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3762- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3754+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
37633755#[ rustc_intrinsic]
37643756#[ rustc_intrinsic_must_be_overridden]
37653757pub const fn maxnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3771,8 +3763,7 @@ pub const fn maxnumf128(_x: f128, _y: f128) -> f128 {
37713763/// The stabilized version of this intrinsic is
37723764/// [`f16::abs`](../../std/primitive.f16.html#method.abs)
37733765#[ rustc_nounwind]
3774- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3775- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3766+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
37763767#[ rustc_intrinsic]
37773768#[ rustc_intrinsic_must_be_overridden]
37783769pub const unsafe fn fabsf16 ( _x : f16 ) -> f16 {
@@ -3784,7 +3775,7 @@ pub const unsafe fn fabsf16(_x: f16) -> f16 {
37843775/// The stabilized version of this intrinsic is
37853776/// [`f32::abs`](../../std/primitive.f32.html#method.abs)
37863777#[ rustc_nounwind]
3787- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3778+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
37883779#[ rustc_intrinsic]
37893780#[ rustc_intrinsic_must_be_overridden]
37903781pub const unsafe fn fabsf32 ( _x : f32 ) -> f32 {
@@ -3796,7 +3787,7 @@ pub const unsafe fn fabsf32(_x: f32) -> f32 {
37963787/// The stabilized version of this intrinsic is
37973788/// [`f64::abs`](../../std/primitive.f64.html#method.abs)
37983789#[ rustc_nounwind]
3799- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3790+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
38003791#[ rustc_intrinsic]
38013792#[ rustc_intrinsic_must_be_overridden]
38023793pub const unsafe fn fabsf64 ( _x : f64 ) -> f64 {
@@ -3808,8 +3799,7 @@ pub const unsafe fn fabsf64(_x: f64) -> f64 {
38083799/// The stabilized version of this intrinsic is
38093800/// [`f128::abs`](../../std/primitive.f128.html#method.abs)
38103801#[ rustc_nounwind]
3811- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3812- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3802+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
38133803#[ rustc_intrinsic]
38143804#[ rustc_intrinsic_must_be_overridden]
38153805pub const unsafe fn fabsf128 ( _x : f128 ) -> f128 {
@@ -3821,8 +3811,7 @@ pub const unsafe fn fabsf128(_x: f128) -> f128 {
38213811/// The stabilized version of this intrinsic is
38223812/// [`f16::copysign`](../../std/primitive.f16.html#method.copysign)
38233813#[ rustc_nounwind]
3824- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3825- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3814+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
38263815#[ rustc_intrinsic]
38273816#[ rustc_intrinsic_must_be_overridden]
38283817pub const unsafe fn copysignf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3834,7 +3823,7 @@ pub const unsafe fn copysignf16(_x: f16, _y: f16) -> f16 {
38343823/// The stabilized version of this intrinsic is
38353824/// [`f32::copysign`](../../std/primitive.f32.html#method.copysign)
38363825#[ rustc_nounwind]
3837- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3826+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
38383827#[ rustc_intrinsic]
38393828#[ rustc_intrinsic_must_be_overridden]
38403829pub const unsafe fn copysignf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3845,7 +3834,7 @@ pub const unsafe fn copysignf32(_x: f32, _y: f32) -> f32 {
38453834/// The stabilized version of this intrinsic is
38463835/// [`f64::copysign`](../../std/primitive.f64.html#method.copysign)
38473836#[ rustc_nounwind]
3848- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3837+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
38493838#[ rustc_intrinsic]
38503839#[ rustc_intrinsic_must_be_overridden]
38513840pub const unsafe fn copysignf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3857,8 +3846,7 @@ pub const unsafe fn copysignf64(_x: f64, _y: f64) -> f64 {
38573846/// The stabilized version of this intrinsic is
38583847/// [`f128::copysign`](../../std/primitive.f128.html#method.copysign)
38593848#[ rustc_nounwind]
3860- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3861- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3849+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
38623850#[ rustc_intrinsic]
38633851#[ rustc_intrinsic_must_be_overridden]
38643852pub const unsafe fn copysignf128 ( _x : f128 , _y : f128 ) -> f128 {
0 commit comments