@@ -2389,7 +2389,6 @@ pub const fn bitreverse<T: Copy>(_x: T) -> T {
2389
2389
/// large and difficult to optimize.
2390
2390
///
2391
2391
/// The stabilized version of this intrinsic is [`Ord::cmp`].
2392
- #[ rustc_const_unstable( feature = "const_three_way_compare" , issue = "none" ) ]
2393
2392
#[ rustc_intrinsic]
2394
2393
#[ rustc_intrinsic_must_be_overridden]
2395
2394
pub 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) {
2457
2456
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
2458
2457
///
2459
2458
/// 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" ) ) ]
2461
2460
#[ rustc_nounwind]
2462
2461
#[ rustc_intrinsic]
2463
2462
#[ rustc_intrinsic_must_be_overridden]
@@ -2784,7 +2783,7 @@ pub const unsafe fn ptr_offset_from<T>(_ptr: *const T, _base: *const T) -> isize
2784
2783
}
2785
2784
2786
2785
/// 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" ) ) ]
2788
2787
#[ rustc_nounwind]
2789
2788
#[ rustc_intrinsic]
2790
2789
#[ rustc_intrinsic_must_be_overridden]
@@ -2796,8 +2795,7 @@ pub const unsafe fn ptr_offset_from_unsigned<T>(_ptr: *const T, _base: *const T)
2796
2795
/// Returns `2` if the result is unknown.
2797
2796
/// Returns `1` if the pointers are guaranteed equal
2798
2797
/// 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" ) ) ]
2801
2799
#[ rustc_intrinsic]
2802
2800
#[ rustc_nounwind]
2803
2801
#[ rustc_do_not_const_check]
@@ -2830,7 +2828,7 @@ pub const fn ptr_guaranteed_cmp<T>(ptr: *const T, other: *const T) -> u8 {
2830
2828
///
2831
2829
/// (The implementation is allowed to branch on the results of comparisons,
2832
2830
/// 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" ) ) ]
2834
2832
#[ rustc_nounwind]
2835
2833
#[ rustc_intrinsic]
2836
2834
#[ rustc_intrinsic_must_be_overridden]
@@ -2852,7 +2850,7 @@ pub const unsafe fn raw_eq<T>(_a: &T, _b: &T) -> bool {
2852
2850
/// that differs. That allows optimizations that can read in large chunks.
2853
2851
///
2854
2852
/// [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" ) ) ]
2856
2854
#[ rustc_nounwind]
2857
2855
#[ rustc_intrinsic]
2858
2856
#[ rustc_intrinsic_must_be_overridden]
@@ -2863,7 +2861,7 @@ pub const unsafe fn compare_bytes(_left: *const u8, _right: *const u8, _bytes: u
2863
2861
/// See documentation of [`std::hint::black_box`] for details.
2864
2862
///
2865
2863
/// [`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" ) ) ]
2867
2865
#[ rustc_nounwind]
2868
2866
#[ rustc_intrinsic]
2869
2867
#[ rustc_intrinsic_must_be_overridden]
@@ -3036,7 +3034,7 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
3036
3034
#[ rustc_nounwind]
3037
3035
#[ inline]
3038
3036
#[ rustc_intrinsic]
3039
- // This has fallback `const fn` MIR, so shouldn't need stability, see #122652
3037
+ // Unstable because `swap_nonoverlapping` is unstable.
3040
3038
#[ rustc_const_unstable( feature = "const_typed_swap" , issue = "none" ) ]
3041
3039
pub const unsafe fn typed_swap < T > ( x : * mut T , y : * mut T ) {
3042
3040
// 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) {
3059
3057
/// primarily used by [`ub_checks::assert_unsafe_precondition`].
3060
3058
#[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ) ]
3061
3059
#[ cfg_attr( not( bootstrap) , rustc_const_stable_intrinsic) ] // just for UB checks
3062
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3063
3060
#[ inline( always) ]
3064
3061
#[ rustc_intrinsic]
3065
3062
pub const fn ub_checks ( ) -> bool {
@@ -3075,7 +3072,6 @@ pub const fn ub_checks() -> bool {
3075
3072
/// - At compile time, a compile error occurs if this constraint is violated.
3076
3073
/// - At runtime, it is not checked.
3077
3074
#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
3078
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3079
3075
#[ rustc_nounwind]
3080
3076
#[ rustc_intrinsic]
3081
3077
#[ miri:: intrinsic_fallback_is_spec]
@@ -3175,7 +3171,7 @@ pub const fn min_align_of<T>() -> usize {
3175
3171
/// It's "tracking issue" is [#91971](https://github.com/rust-lang/rust/issues/91971).
3176
3172
#[ rustc_nounwind]
3177
3173
#[ 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" ) ) ]
3179
3175
#[ rustc_intrinsic]
3180
3176
#[ rustc_intrinsic_must_be_overridden]
3181
3177
pub const unsafe fn pref_align_of < T > ( ) -> usize {
@@ -3193,7 +3189,7 @@ pub const unsafe fn pref_align_of<T>() -> usize {
3193
3189
/// The to-be-stabilized version of this intrinsic is [`crate::mem::variant_count`].
3194
3190
#[ rustc_nounwind]
3195
3191
#[ 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" ) ) ]
3197
3193
#[ rustc_intrinsic]
3198
3194
#[ rustc_intrinsic_must_be_overridden]
3199
3195
pub const fn variant_count < T > ( ) -> usize {
@@ -3209,7 +3205,7 @@ pub const fn variant_count<T>() -> usize {
3209
3205
/// See [`crate::mem::size_of_val_raw`] for safety conditions.
3210
3206
#[ rustc_nounwind]
3211
3207
#[ 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" ) ) ]
3213
3209
#[ rustc_intrinsic]
3214
3210
#[ rustc_intrinsic_must_be_overridden]
3215
3211
pub 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 {
3225
3221
/// See [`crate::mem::align_of_val_raw`] for safety conditions.
3226
3222
#[ rustc_nounwind]
3227
3223
#[ 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" ) ) ]
3229
3225
#[ rustc_intrinsic]
3230
3226
#[ rustc_intrinsic_must_be_overridden]
3231
3227
pub 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 {
3242
3238
/// The stabilized version of this intrinsic is [`core::any::type_name`].
3243
3239
#[ rustc_nounwind]
3244
3240
#[ 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" ) ) ]
3246
3242
#[ rustc_intrinsic]
3247
3243
#[ rustc_intrinsic_must_be_overridden]
3248
3244
pub const fn type_name < T : ?Sized > ( ) -> & ' static str {
@@ -3261,7 +3257,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
3261
3257
/// The stabilized version of this intrinsic is [`core::any::TypeId::of`].
3262
3258
#[ rustc_nounwind]
3263
3259
#[ 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" ) ) ]
3265
3261
#[ rustc_intrinsic]
3266
3262
#[ rustc_intrinsic_must_be_overridden]
3267
3263
pub 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) {
3636
3632
/// The stabilized version of this intrinsic is
3637
3633
/// [`f16::min`]
3638
3634
#[ 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" ) ) ]
3641
3636
#[ rustc_intrinsic]
3642
3637
#[ rustc_intrinsic_must_be_overridden]
3643
3638
pub const fn minnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3654,7 +3649,7 @@ pub const fn minnumf16(_x: f16, _y: f16) -> f16 {
3654
3649
/// The stabilized version of this intrinsic is
3655
3650
/// [`f32::min`]
3656
3651
#[ 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" ) ) ]
3658
3653
#[ rustc_intrinsic]
3659
3654
#[ rustc_intrinsic_must_be_overridden]
3660
3655
pub const fn minnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3671,7 +3666,7 @@ pub const fn minnumf32(_x: f32, _y: f32) -> f32 {
3671
3666
/// The stabilized version of this intrinsic is
3672
3667
/// [`f64::min`]
3673
3668
#[ 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" ) ) ]
3675
3670
#[ rustc_intrinsic]
3676
3671
#[ rustc_intrinsic_must_be_overridden]
3677
3672
pub const fn minnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3688,8 +3683,7 @@ pub const fn minnumf64(_x: f64, _y: f64) -> f64 {
3688
3683
/// The stabilized version of this intrinsic is
3689
3684
/// [`f128::min`]
3690
3685
#[ 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" ) ) ]
3693
3687
#[ rustc_intrinsic]
3694
3688
#[ rustc_intrinsic_must_be_overridden]
3695
3689
pub const fn minnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3706,8 +3700,7 @@ pub const fn minnumf128(_x: f128, _y: f128) -> f128 {
3706
3700
/// The stabilized version of this intrinsic is
3707
3701
/// [`f16::max`]
3708
3702
#[ 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" ) ) ]
3711
3704
#[ rustc_intrinsic]
3712
3705
#[ rustc_intrinsic_must_be_overridden]
3713
3706
pub const fn maxnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3724,7 +3717,7 @@ pub const fn maxnumf16(_x: f16, _y: f16) -> f16 {
3724
3717
/// The stabilized version of this intrinsic is
3725
3718
/// [`f32::max`]
3726
3719
#[ 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" ) ) ]
3728
3721
#[ rustc_intrinsic]
3729
3722
#[ rustc_intrinsic_must_be_overridden]
3730
3723
pub const fn maxnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3741,7 +3734,7 @@ pub const fn maxnumf32(_x: f32, _y: f32) -> f32 {
3741
3734
/// The stabilized version of this intrinsic is
3742
3735
/// [`f64::max`]
3743
3736
#[ 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" ) ) ]
3745
3738
#[ rustc_intrinsic]
3746
3739
#[ rustc_intrinsic_must_be_overridden]
3747
3740
pub const fn maxnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3758,8 +3751,7 @@ pub const fn maxnumf64(_x: f64, _y: f64) -> f64 {
3758
3751
/// The stabilized version of this intrinsic is
3759
3752
/// [`f128::max`]
3760
3753
#[ 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" ) ) ]
3763
3755
#[ rustc_intrinsic]
3764
3756
#[ rustc_intrinsic_must_be_overridden]
3765
3757
pub const fn maxnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3771,8 +3763,7 @@ pub const fn maxnumf128(_x: f128, _y: f128) -> f128 {
3771
3763
/// The stabilized version of this intrinsic is
3772
3764
/// [`f16::abs`](../../std/primitive.f16.html#method.abs)
3773
3765
#[ 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" ) ) ]
3776
3767
#[ rustc_intrinsic]
3777
3768
#[ rustc_intrinsic_must_be_overridden]
3778
3769
pub const unsafe fn fabsf16 ( _x : f16 ) -> f16 {
@@ -3784,7 +3775,7 @@ pub const unsafe fn fabsf16(_x: f16) -> f16 {
3784
3775
/// The stabilized version of this intrinsic is
3785
3776
/// [`f32::abs`](../../std/primitive.f32.html#method.abs)
3786
3777
#[ 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" ) ) ]
3788
3779
#[ rustc_intrinsic]
3789
3780
#[ rustc_intrinsic_must_be_overridden]
3790
3781
pub const unsafe fn fabsf32 ( _x : f32 ) -> f32 {
@@ -3796,7 +3787,7 @@ pub const unsafe fn fabsf32(_x: f32) -> f32 {
3796
3787
/// The stabilized version of this intrinsic is
3797
3788
/// [`f64::abs`](../../std/primitive.f64.html#method.abs)
3798
3789
#[ 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" ) ) ]
3800
3791
#[ rustc_intrinsic]
3801
3792
#[ rustc_intrinsic_must_be_overridden]
3802
3793
pub const unsafe fn fabsf64 ( _x : f64 ) -> f64 {
@@ -3808,8 +3799,7 @@ pub const unsafe fn fabsf64(_x: f64) -> f64 {
3808
3799
/// The stabilized version of this intrinsic is
3809
3800
/// [`f128::abs`](../../std/primitive.f128.html#method.abs)
3810
3801
#[ 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" ) ) ]
3813
3803
#[ rustc_intrinsic]
3814
3804
#[ rustc_intrinsic_must_be_overridden]
3815
3805
pub const unsafe fn fabsf128 ( _x : f128 ) -> f128 {
@@ -3821,8 +3811,7 @@ pub const unsafe fn fabsf128(_x: f128) -> f128 {
3821
3811
/// The stabilized version of this intrinsic is
3822
3812
/// [`f16::copysign`](../../std/primitive.f16.html#method.copysign)
3823
3813
#[ 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" ) ) ]
3826
3815
#[ rustc_intrinsic]
3827
3816
#[ rustc_intrinsic_must_be_overridden]
3828
3817
pub const unsafe fn copysignf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3834,7 +3823,7 @@ pub const unsafe fn copysignf16(_x: f16, _y: f16) -> f16 {
3834
3823
/// The stabilized version of this intrinsic is
3835
3824
/// [`f32::copysign`](../../std/primitive.f32.html#method.copysign)
3836
3825
#[ 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" ) ) ]
3838
3827
#[ rustc_intrinsic]
3839
3828
#[ rustc_intrinsic_must_be_overridden]
3840
3829
pub const unsafe fn copysignf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3845,7 +3834,7 @@ pub const unsafe fn copysignf32(_x: f32, _y: f32) -> f32 {
3845
3834
/// The stabilized version of this intrinsic is
3846
3835
/// [`f64::copysign`](../../std/primitive.f64.html#method.copysign)
3847
3836
#[ 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" ) ) ]
3849
3838
#[ rustc_intrinsic]
3850
3839
#[ rustc_intrinsic_must_be_overridden]
3851
3840
pub const unsafe fn copysignf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3857,8 +3846,7 @@ pub const unsafe fn copysignf64(_x: f64, _y: f64) -> f64 {
3857
3846
/// The stabilized version of this intrinsic is
3858
3847
/// [`f128::copysign`](../../std/primitive.f128.html#method.copysign)
3859
3848
#[ 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" ) ) ]
3862
3850
#[ rustc_intrinsic]
3863
3851
#[ rustc_intrinsic_must_be_overridden]
3864
3852
pub const unsafe fn copysignf128 ( _x : f128 , _y : f128 ) -> f128 {
0 commit comments