@@ -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,10 @@ 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(
2854
+ bootstrap,
2855
+ rustc_const_unstable( feature = "const_intrinsic_compare_bytes" , issue = "none" )
2856
+ ) ]
2856
2857
#[ rustc_nounwind]
2857
2858
#[ rustc_intrinsic]
2858
2859
#[ rustc_intrinsic_must_be_overridden]
@@ -2863,7 +2864,7 @@ pub const unsafe fn compare_bytes(_left: *const u8, _right: *const u8, _bytes: u
2863
2864
/// See documentation of [`std::hint::black_box`] for details.
2864
2865
///
2865
2866
/// [`std::hint::black_box`]: crate::hint::black_box
2866
- #[ rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ]
2867
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ) ]
2867
2868
#[ rustc_nounwind]
2868
2869
#[ rustc_intrinsic]
2869
2870
#[ rustc_intrinsic_must_be_overridden]
@@ -3036,7 +3037,7 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
3036
3037
#[ rustc_nounwind]
3037
3038
#[ inline]
3038
3039
#[ rustc_intrinsic]
3039
- // This has fallback `const fn` MIR, so shouldn't need stability, see #122652
3040
+ // Unstable because `swap_nonoverlapping` is unstable.
3040
3041
#[ rustc_const_unstable( feature = "const_typed_swap" , issue = "none" ) ]
3041
3042
pub const unsafe fn typed_swap < T > ( x : * mut T , y : * mut T ) {
3042
3043
// SAFETY: The caller provided single non-overlapping items behind
@@ -3059,7 +3060,6 @@ pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
3059
3060
/// primarily used by [`ub_checks::assert_unsafe_precondition`].
3060
3061
#[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ) ]
3061
3062
#[ cfg_attr( not( bootstrap) , rustc_const_stable_intrinsic) ] // just for UB checks
3062
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3063
3063
#[ inline( always) ]
3064
3064
#[ rustc_intrinsic]
3065
3065
pub const fn ub_checks ( ) -> bool {
@@ -3075,7 +3075,6 @@ pub const fn ub_checks() -> bool {
3075
3075
/// - At compile time, a compile error occurs if this constraint is violated.
3076
3076
/// - At runtime, it is not checked.
3077
3077
#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
3078
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3079
3078
#[ rustc_nounwind]
3080
3079
#[ rustc_intrinsic]
3081
3080
#[ miri:: intrinsic_fallback_is_spec]
@@ -3175,7 +3174,7 @@ pub const fn min_align_of<T>() -> usize {
3175
3174
/// It's "tracking issue" is [#91971](https://github.com/rust-lang/rust/issues/91971).
3176
3175
#[ rustc_nounwind]
3177
3176
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3178
- #[ rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ]
3177
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ) ]
3179
3178
#[ rustc_intrinsic]
3180
3179
#[ rustc_intrinsic_must_be_overridden]
3181
3180
pub const unsafe fn pref_align_of < T > ( ) -> usize {
@@ -3193,7 +3192,7 @@ pub const unsafe fn pref_align_of<T>() -> usize {
3193
3192
/// The to-be-stabilized version of this intrinsic is [`crate::mem::variant_count`].
3194
3193
#[ rustc_nounwind]
3195
3194
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3196
- #[ rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ]
3195
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ) ]
3197
3196
#[ rustc_intrinsic]
3198
3197
#[ rustc_intrinsic_must_be_overridden]
3199
3198
pub const fn variant_count < T > ( ) -> usize {
@@ -3209,7 +3208,7 @@ pub const fn variant_count<T>() -> usize {
3209
3208
/// See [`crate::mem::size_of_val_raw`] for safety conditions.
3210
3209
#[ rustc_nounwind]
3211
3210
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3212
- #[ rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ]
3211
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ) ]
3213
3212
#[ rustc_intrinsic]
3214
3213
#[ rustc_intrinsic_must_be_overridden]
3215
3214
pub const unsafe fn size_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3225,7 +3224,7 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
3225
3224
/// See [`crate::mem::align_of_val_raw`] for safety conditions.
3226
3225
#[ rustc_nounwind]
3227
3226
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3228
- #[ rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ]
3227
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ) ]
3229
3228
#[ rustc_intrinsic]
3230
3229
#[ rustc_intrinsic_must_be_overridden]
3231
3230
pub const unsafe fn min_align_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3242,7 +3241,7 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
3242
3241
/// The stabilized version of this intrinsic is [`core::any::type_name`].
3243
3242
#[ rustc_nounwind]
3244
3243
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3245
- #[ rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ]
3244
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ) ]
3246
3245
#[ rustc_intrinsic]
3247
3246
#[ rustc_intrinsic_must_be_overridden]
3248
3247
pub const fn type_name < T : ?Sized > ( ) -> & ' static str {
@@ -3261,7 +3260,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
3261
3260
/// The stabilized version of this intrinsic is [`core::any::TypeId::of`].
3262
3261
#[ rustc_nounwind]
3263
3262
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3264
- #[ rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ]
3263
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ) ]
3265
3264
#[ rustc_intrinsic]
3266
3265
#[ rustc_intrinsic_must_be_overridden]
3267
3266
pub const fn type_id < T : ?Sized + ' static > ( ) -> u128 {
@@ -3636,8 +3635,7 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
3636
3635
/// The stabilized version of this intrinsic is
3637
3636
/// [`f16::min`]
3638
3637
#[ rustc_nounwind]
3639
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3640
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3638
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3641
3639
#[ rustc_intrinsic]
3642
3640
#[ rustc_intrinsic_must_be_overridden]
3643
3641
pub const fn minnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3654,7 +3652,7 @@ pub const fn minnumf16(_x: f16, _y: f16) -> f16 {
3654
3652
/// The stabilized version of this intrinsic is
3655
3653
/// [`f32::min`]
3656
3654
#[ rustc_nounwind]
3657
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3655
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3658
3656
#[ rustc_intrinsic]
3659
3657
#[ rustc_intrinsic_must_be_overridden]
3660
3658
pub const fn minnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3671,7 +3669,7 @@ pub const fn minnumf32(_x: f32, _y: f32) -> f32 {
3671
3669
/// The stabilized version of this intrinsic is
3672
3670
/// [`f64::min`]
3673
3671
#[ rustc_nounwind]
3674
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3672
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3675
3673
#[ rustc_intrinsic]
3676
3674
#[ rustc_intrinsic_must_be_overridden]
3677
3675
pub const fn minnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3688,8 +3686,7 @@ pub const fn minnumf64(_x: f64, _y: f64) -> f64 {
3688
3686
/// The stabilized version of this intrinsic is
3689
3687
/// [`f128::min`]
3690
3688
#[ rustc_nounwind]
3691
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3692
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3689
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3693
3690
#[ rustc_intrinsic]
3694
3691
#[ rustc_intrinsic_must_be_overridden]
3695
3692
pub const fn minnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3706,8 +3703,7 @@ pub const fn minnumf128(_x: f128, _y: f128) -> f128 {
3706
3703
/// The stabilized version of this intrinsic is
3707
3704
/// [`f16::max`]
3708
3705
#[ rustc_nounwind]
3709
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3710
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3706
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3711
3707
#[ rustc_intrinsic]
3712
3708
#[ rustc_intrinsic_must_be_overridden]
3713
3709
pub const fn maxnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3724,7 +3720,7 @@ pub const fn maxnumf16(_x: f16, _y: f16) -> f16 {
3724
3720
/// The stabilized version of this intrinsic is
3725
3721
/// [`f32::max`]
3726
3722
#[ rustc_nounwind]
3727
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3723
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3728
3724
#[ rustc_intrinsic]
3729
3725
#[ rustc_intrinsic_must_be_overridden]
3730
3726
pub const fn maxnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3741,7 +3737,7 @@ pub const fn maxnumf32(_x: f32, _y: f32) -> f32 {
3741
3737
/// The stabilized version of this intrinsic is
3742
3738
/// [`f64::max`]
3743
3739
#[ rustc_nounwind]
3744
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3740
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3745
3741
#[ rustc_intrinsic]
3746
3742
#[ rustc_intrinsic_must_be_overridden]
3747
3743
pub const fn maxnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3758,8 +3754,7 @@ pub const fn maxnumf64(_x: f64, _y: f64) -> f64 {
3758
3754
/// The stabilized version of this intrinsic is
3759
3755
/// [`f128::max`]
3760
3756
#[ rustc_nounwind]
3761
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3762
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3757
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3763
3758
#[ rustc_intrinsic]
3764
3759
#[ rustc_intrinsic_must_be_overridden]
3765
3760
pub const fn maxnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3771,8 +3766,7 @@ pub const fn maxnumf128(_x: f128, _y: f128) -> f128 {
3771
3766
/// The stabilized version of this intrinsic is
3772
3767
/// [`f16::abs`](../../std/primitive.f16.html#method.abs)
3773
3768
#[ rustc_nounwind]
3774
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3775
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3769
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3776
3770
#[ rustc_intrinsic]
3777
3771
#[ rustc_intrinsic_must_be_overridden]
3778
3772
pub const unsafe fn fabsf16 ( _x : f16 ) -> f16 {
@@ -3784,7 +3778,7 @@ pub const unsafe fn fabsf16(_x: f16) -> f16 {
3784
3778
/// The stabilized version of this intrinsic is
3785
3779
/// [`f32::abs`](../../std/primitive.f32.html#method.abs)
3786
3780
#[ rustc_nounwind]
3787
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3781
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3788
3782
#[ rustc_intrinsic]
3789
3783
#[ rustc_intrinsic_must_be_overridden]
3790
3784
pub const unsafe fn fabsf32 ( _x : f32 ) -> f32 {
@@ -3796,7 +3790,7 @@ pub const unsafe fn fabsf32(_x: f32) -> f32 {
3796
3790
/// The stabilized version of this intrinsic is
3797
3791
/// [`f64::abs`](../../std/primitive.f64.html#method.abs)
3798
3792
#[ rustc_nounwind]
3799
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3793
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3800
3794
#[ rustc_intrinsic]
3801
3795
#[ rustc_intrinsic_must_be_overridden]
3802
3796
pub const unsafe fn fabsf64 ( _x : f64 ) -> f64 {
@@ -3808,8 +3802,7 @@ pub const unsafe fn fabsf64(_x: f64) -> f64 {
3808
3802
/// The stabilized version of this intrinsic is
3809
3803
/// [`f128::abs`](../../std/primitive.f128.html#method.abs)
3810
3804
#[ rustc_nounwind]
3811
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3812
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3805
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3813
3806
#[ rustc_intrinsic]
3814
3807
#[ rustc_intrinsic_must_be_overridden]
3815
3808
pub const unsafe fn fabsf128 ( _x : f128 ) -> f128 {
@@ -3821,8 +3814,7 @@ pub const unsafe fn fabsf128(_x: f128) -> f128 {
3821
3814
/// The stabilized version of this intrinsic is
3822
3815
/// [`f16::copysign`](../../std/primitive.f16.html#method.copysign)
3823
3816
#[ rustc_nounwind]
3824
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3825
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3817
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3826
3818
#[ rustc_intrinsic]
3827
3819
#[ rustc_intrinsic_must_be_overridden]
3828
3820
pub const unsafe fn copysignf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3834,7 +3826,7 @@ pub const unsafe fn copysignf16(_x: f16, _y: f16) -> f16 {
3834
3826
/// The stabilized version of this intrinsic is
3835
3827
/// [`f32::copysign`](../../std/primitive.f32.html#method.copysign)
3836
3828
#[ rustc_nounwind]
3837
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3829
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3838
3830
#[ rustc_intrinsic]
3839
3831
#[ rustc_intrinsic_must_be_overridden]
3840
3832
pub const unsafe fn copysignf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3845,7 +3837,7 @@ pub const unsafe fn copysignf32(_x: f32, _y: f32) -> f32 {
3845
3837
/// The stabilized version of this intrinsic is
3846
3838
/// [`f64::copysign`](../../std/primitive.f64.html#method.copysign)
3847
3839
#[ rustc_nounwind]
3848
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3840
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3849
3841
#[ rustc_intrinsic]
3850
3842
#[ rustc_intrinsic_must_be_overridden]
3851
3843
pub const unsafe fn copysignf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3857,8 +3849,7 @@ pub const unsafe fn copysignf64(_x: f64, _y: f64) -> f64 {
3857
3849
/// The stabilized version of this intrinsic is
3858
3850
/// [`f128::copysign`](../../std/primitive.f128.html#method.copysign)
3859
3851
#[ rustc_nounwind]
3860
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3861
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3852
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3862
3853
#[ rustc_intrinsic]
3863
3854
#[ rustc_intrinsic_must_be_overridden]
3864
3855
pub const unsafe fn copysignf128 ( _x : f128 , _y : f128 ) -> f128 {
0 commit comments