@@ -2389,7 +2389,7 @@ 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" ) ]
2392
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_three_way_compare" , issue = "none" ) ) ]
2393
2393
#[ rustc_intrinsic]
2394
2394
#[ rustc_intrinsic_must_be_overridden]
2395
2395
pub const fn three_way_compare < T : Copy > ( _lhs : T , _rhss : T ) -> crate :: cmp:: Ordering {
@@ -2457,7 +2457,7 @@ pub const fn mul_with_overflow<T: Copy>(_x: T, _y: T) -> (T, bool) {
2457
2457
/// `x % y != 0` or `y == 0` or `x == T::MIN && y == -1`
2458
2458
///
2459
2459
/// This intrinsic does not have a stable counterpart.
2460
- #[ rustc_const_unstable( feature = "const_exact_div" , issue = "none" ) ]
2460
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_exact_div" , issue = "none" ) ) ]
2461
2461
#[ rustc_nounwind]
2462
2462
#[ rustc_intrinsic]
2463
2463
#[ rustc_intrinsic_must_be_overridden]
@@ -2784,7 +2784,7 @@ pub const unsafe fn ptr_offset_from<T>(_ptr: *const T, _base: *const T) -> isize
2784
2784
}
2785
2785
2786
2786
/// See documentation of `<*const T>::sub_ptr` for details.
2787
- #[ rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ]
2787
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_ptr_sub_ptr" , issue = "95892" ) ) ]
2788
2788
#[ rustc_nounwind]
2789
2789
#[ rustc_intrinsic]
2790
2790
#[ rustc_intrinsic_must_be_overridden]
@@ -2796,8 +2796,7 @@ pub const unsafe fn ptr_offset_from_unsigned<T>(_ptr: *const T, _base: *const T)
2796
2796
/// Returns `2` if the result is unknown.
2797
2797
/// Returns `1` if the pointers are guaranteed equal
2798
2798
/// 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" ) ]
2799
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_raw_ptr_comparison" , issue = "53020" ) ) ]
2801
2800
#[ rustc_intrinsic]
2802
2801
#[ rustc_nounwind]
2803
2802
#[ rustc_do_not_const_check]
@@ -2830,7 +2829,7 @@ pub const fn ptr_guaranteed_cmp<T>(ptr: *const T, other: *const T) -> u8 {
2830
2829
///
2831
2830
/// (The implementation is allowed to branch on the results of comparisons,
2832
2831
/// which is UB if any of their inputs are `undef`.)
2833
- #[ rustc_const_unstable( feature = "const_intrinsic_raw_eq" , issue = "none" ) ]
2832
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_intrinsic_raw_eq" , issue = "none" ) ) ]
2834
2833
#[ rustc_nounwind]
2835
2834
#[ rustc_intrinsic]
2836
2835
#[ rustc_intrinsic_must_be_overridden]
@@ -2852,7 +2851,10 @@ pub const unsafe fn raw_eq<T>(_a: &T, _b: &T) -> bool {
2852
2851
/// that differs. That allows optimizations that can read in large chunks.
2853
2852
///
2854
2853
/// [valid]: crate::ptr#safety
2855
- #[ rustc_const_unstable( feature = "const_intrinsic_compare_bytes" , issue = "none" ) ]
2854
+ #[ cfg_attr(
2855
+ bootstrap,
2856
+ rustc_const_unstable( feature = "const_intrinsic_compare_bytes" , issue = "none" )
2857
+ ) ]
2856
2858
#[ rustc_nounwind]
2857
2859
#[ rustc_intrinsic]
2858
2860
#[ rustc_intrinsic_must_be_overridden]
@@ -2863,7 +2865,7 @@ pub const unsafe fn compare_bytes(_left: *const u8, _right: *const u8, _bytes: u
2863
2865
/// See documentation of [`std::hint::black_box`] for details.
2864
2866
///
2865
2867
/// [`std::hint::black_box`]: crate::hint::black_box
2866
- #[ rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ]
2868
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_black_box" , issue = "none" ) ) ]
2867
2869
#[ rustc_nounwind]
2868
2870
#[ rustc_intrinsic]
2869
2871
#[ rustc_intrinsic_must_be_overridden]
@@ -3036,7 +3038,7 @@ pub const fn is_val_statically_known<T: Copy>(_arg: T) -> bool {
3036
3038
#[ rustc_nounwind]
3037
3039
#[ inline]
3038
3040
#[ rustc_intrinsic]
3039
- // This has fallback `const fn` MIR, so shouldn't need stability, see #122652
3041
+ // Const-unstable because `swap_nonoverlapping` is const-unstable.
3040
3042
#[ rustc_const_unstable( feature = "const_typed_swap" , issue = "none" ) ]
3041
3043
pub const unsafe fn typed_swap < T > ( x : * mut T , y : * mut T ) {
3042
3044
// SAFETY: The caller provided single non-overlapping items behind
@@ -3059,7 +3061,6 @@ pub const unsafe fn typed_swap<T>(x: *mut T, y: *mut T) {
3059
3061
/// primarily used by [`ub_checks::assert_unsafe_precondition`].
3060
3062
#[ cfg_attr( bootstrap, rustc_const_unstable( feature = "const_ub_checks" , issue = "none" ) ) ]
3061
3063
#[ cfg_attr( not( bootstrap) , rustc_const_stable_intrinsic) ] // just for UB checks
3062
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3063
3064
#[ inline( always) ]
3064
3065
#[ rustc_intrinsic]
3065
3066
pub const fn ub_checks ( ) -> bool {
@@ -3075,7 +3076,6 @@ pub const fn ub_checks() -> bool {
3075
3076
/// - At compile time, a compile error occurs if this constraint is violated.
3076
3077
/// - At runtime, it is not checked.
3077
3078
#[ rustc_const_unstable( feature = "const_heap" , issue = "79597" ) ]
3078
- #[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3079
3079
#[ rustc_nounwind]
3080
3080
#[ rustc_intrinsic]
3081
3081
#[ miri:: intrinsic_fallback_is_spec]
@@ -3175,7 +3175,7 @@ pub const fn min_align_of<T>() -> usize {
3175
3175
/// It's "tracking issue" is [#91971](https://github.com/rust-lang/rust/issues/91971).
3176
3176
#[ rustc_nounwind]
3177
3177
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3178
- #[ rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ]
3178
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_pref_align_of" , issue = "91971" ) ) ]
3179
3179
#[ rustc_intrinsic]
3180
3180
#[ rustc_intrinsic_must_be_overridden]
3181
3181
pub const unsafe fn pref_align_of < T > ( ) -> usize {
@@ -3193,7 +3193,7 @@ pub const unsafe fn pref_align_of<T>() -> usize {
3193
3193
/// The to-be-stabilized version of this intrinsic is [`crate::mem::variant_count`].
3194
3194
#[ rustc_nounwind]
3195
3195
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3196
- #[ rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ]
3196
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "variant_count" , issue = "73662" ) ) ]
3197
3197
#[ rustc_intrinsic]
3198
3198
#[ rustc_intrinsic_must_be_overridden]
3199
3199
pub const fn variant_count < T > ( ) -> usize {
@@ -3209,7 +3209,7 @@ pub const fn variant_count<T>() -> usize {
3209
3209
/// See [`crate::mem::size_of_val_raw`] for safety conditions.
3210
3210
#[ rustc_nounwind]
3211
3211
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3212
- #[ rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ]
3212
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_size_of_val" , issue = "46571" ) ) ]
3213
3213
#[ rustc_intrinsic]
3214
3214
#[ rustc_intrinsic_must_be_overridden]
3215
3215
pub const unsafe fn size_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3225,7 +3225,7 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
3225
3225
/// See [`crate::mem::align_of_val_raw`] for safety conditions.
3226
3226
#[ rustc_nounwind]
3227
3227
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3228
- #[ rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ]
3228
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_align_of_val" , issue = "46571" ) ) ]
3229
3229
#[ rustc_intrinsic]
3230
3230
#[ rustc_intrinsic_must_be_overridden]
3231
3231
pub const unsafe fn min_align_of_val < T : ?Sized > ( _ptr : * const T ) -> usize {
@@ -3242,7 +3242,7 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
3242
3242
/// The stabilized version of this intrinsic is [`core::any::type_name`].
3243
3243
#[ rustc_nounwind]
3244
3244
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3245
- #[ rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ]
3245
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_name" , issue = "63084" ) ) ]
3246
3246
#[ rustc_intrinsic]
3247
3247
#[ rustc_intrinsic_must_be_overridden]
3248
3248
pub const fn type_name < T : ?Sized > ( ) -> & ' static str {
@@ -3261,7 +3261,7 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
3261
3261
/// The stabilized version of this intrinsic is [`core::any::TypeId::of`].
3262
3262
#[ rustc_nounwind]
3263
3263
#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
3264
- #[ rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ]
3264
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_type_id" , issue = "77125" ) ) ]
3265
3265
#[ rustc_intrinsic]
3266
3266
#[ rustc_intrinsic_must_be_overridden]
3267
3267
pub const fn type_id < T : ?Sized + ' static > ( ) -> u128 {
@@ -3636,8 +3636,7 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
3636
3636
/// The stabilized version of this intrinsic is
3637
3637
/// [`f16::min`]
3638
3638
#[ rustc_nounwind]
3639
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3640
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3639
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3641
3640
#[ rustc_intrinsic]
3642
3641
#[ rustc_intrinsic_must_be_overridden]
3643
3642
pub const fn minnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3654,7 +3653,7 @@ pub const fn minnumf16(_x: f16, _y: f16) -> f16 {
3654
3653
/// The stabilized version of this intrinsic is
3655
3654
/// [`f32::min`]
3656
3655
#[ rustc_nounwind]
3657
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3656
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3658
3657
#[ rustc_intrinsic]
3659
3658
#[ rustc_intrinsic_must_be_overridden]
3660
3659
pub const fn minnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3671,7 +3670,7 @@ pub const fn minnumf32(_x: f32, _y: f32) -> f32 {
3671
3670
/// The stabilized version of this intrinsic is
3672
3671
/// [`f64::min`]
3673
3672
#[ rustc_nounwind]
3674
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3673
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3675
3674
#[ rustc_intrinsic]
3676
3675
#[ rustc_intrinsic_must_be_overridden]
3677
3676
pub const fn minnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3688,8 +3687,7 @@ pub const fn minnumf64(_x: f64, _y: f64) -> f64 {
3688
3687
/// The stabilized version of this intrinsic is
3689
3688
/// [`f128::min`]
3690
3689
#[ rustc_nounwind]
3691
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3692
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3690
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3693
3691
#[ rustc_intrinsic]
3694
3692
#[ rustc_intrinsic_must_be_overridden]
3695
3693
pub const fn minnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3706,8 +3704,7 @@ pub const fn minnumf128(_x: f128, _y: f128) -> f128 {
3706
3704
/// The stabilized version of this intrinsic is
3707
3705
/// [`f16::max`]
3708
3706
#[ rustc_nounwind]
3709
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3710
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3707
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3711
3708
#[ rustc_intrinsic]
3712
3709
#[ rustc_intrinsic_must_be_overridden]
3713
3710
pub const fn maxnumf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3724,7 +3721,7 @@ pub const fn maxnumf16(_x: f16, _y: f16) -> f16 {
3724
3721
/// The stabilized version of this intrinsic is
3725
3722
/// [`f32::max`]
3726
3723
#[ rustc_nounwind]
3727
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3724
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3728
3725
#[ rustc_intrinsic]
3729
3726
#[ rustc_intrinsic_must_be_overridden]
3730
3727
pub const fn maxnumf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3741,7 +3738,7 @@ pub const fn maxnumf32(_x: f32, _y: f32) -> f32 {
3741
3738
/// The stabilized version of this intrinsic is
3742
3739
/// [`f64::max`]
3743
3740
#[ rustc_nounwind]
3744
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3741
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3745
3742
#[ rustc_intrinsic]
3746
3743
#[ rustc_intrinsic_must_be_overridden]
3747
3744
pub const fn maxnumf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3758,8 +3755,7 @@ pub const fn maxnumf64(_x: f64, _y: f64) -> f64 {
3758
3755
/// The stabilized version of this intrinsic is
3759
3756
/// [`f128::max`]
3760
3757
#[ rustc_nounwind]
3761
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3762
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3758
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3763
3759
#[ rustc_intrinsic]
3764
3760
#[ rustc_intrinsic_must_be_overridden]
3765
3761
pub const fn maxnumf128 ( _x : f128 , _y : f128 ) -> f128 {
@@ -3771,8 +3767,7 @@ pub const fn maxnumf128(_x: f128, _y: f128) -> f128 {
3771
3767
/// The stabilized version of this intrinsic is
3772
3768
/// [`f16::abs`](../../std/primitive.f16.html#method.abs)
3773
3769
#[ rustc_nounwind]
3774
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3775
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3770
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3776
3771
#[ rustc_intrinsic]
3777
3772
#[ rustc_intrinsic_must_be_overridden]
3778
3773
pub const unsafe fn fabsf16 ( _x : f16 ) -> f16 {
@@ -3784,7 +3779,7 @@ pub const unsafe fn fabsf16(_x: f16) -> f16 {
3784
3779
/// The stabilized version of this intrinsic is
3785
3780
/// [`f32::abs`](../../std/primitive.f32.html#method.abs)
3786
3781
#[ rustc_nounwind]
3787
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3782
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3788
3783
#[ rustc_intrinsic]
3789
3784
#[ rustc_intrinsic_must_be_overridden]
3790
3785
pub const unsafe fn fabsf32 ( _x : f32 ) -> f32 {
@@ -3796,7 +3791,7 @@ pub const unsafe fn fabsf32(_x: f32) -> f32 {
3796
3791
/// The stabilized version of this intrinsic is
3797
3792
/// [`f64::abs`](../../std/primitive.f64.html#method.abs)
3798
3793
#[ rustc_nounwind]
3799
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3794
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3800
3795
#[ rustc_intrinsic]
3801
3796
#[ rustc_intrinsic_must_be_overridden]
3802
3797
pub const unsafe fn fabsf64 ( _x : f64 ) -> f64 {
@@ -3808,8 +3803,7 @@ pub const unsafe fn fabsf64(_x: f64) -> f64 {
3808
3803
/// The stabilized version of this intrinsic is
3809
3804
/// [`f128::abs`](../../std/primitive.f128.html#method.abs)
3810
3805
#[ rustc_nounwind]
3811
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3812
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3806
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3813
3807
#[ rustc_intrinsic]
3814
3808
#[ rustc_intrinsic_must_be_overridden]
3815
3809
pub const unsafe fn fabsf128 ( _x : f128 ) -> f128 {
@@ -3821,8 +3815,7 @@ pub const unsafe fn fabsf128(_x: f128) -> f128 {
3821
3815
/// The stabilized version of this intrinsic is
3822
3816
/// [`f16::copysign`](../../std/primitive.f16.html#method.copysign)
3823
3817
#[ rustc_nounwind]
3824
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3825
- #[ rustc_const_unstable( feature = "f16" , issue = "116909" ) ]
3818
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f16" , issue = "116909" ) ) ]
3826
3819
#[ rustc_intrinsic]
3827
3820
#[ rustc_intrinsic_must_be_overridden]
3828
3821
pub const unsafe fn copysignf16 ( _x : f16 , _y : f16 ) -> f16 {
@@ -3834,7 +3827,7 @@ pub const unsafe fn copysignf16(_x: f16, _y: f16) -> f16 {
3834
3827
/// The stabilized version of this intrinsic is
3835
3828
/// [`f32::copysign`](../../std/primitive.f32.html#method.copysign)
3836
3829
#[ rustc_nounwind]
3837
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3830
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3838
3831
#[ rustc_intrinsic]
3839
3832
#[ rustc_intrinsic_must_be_overridden]
3840
3833
pub const unsafe fn copysignf32 ( _x : f32 , _y : f32 ) -> f32 {
@@ -3845,7 +3838,7 @@ pub const unsafe fn copysignf32(_x: f32, _y: f32) -> f32 {
3845
3838
/// The stabilized version of this intrinsic is
3846
3839
/// [`f64::copysign`](../../std/primitive.f64.html#method.copysign)
3847
3840
#[ rustc_nounwind]
3848
- #[ rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ]
3841
+ #[ cfg_attr ( bootstrap , rustc_const_unstable( feature = "const_float_methods" , issue = "130843" ) ) ]
3849
3842
#[ rustc_intrinsic]
3850
3843
#[ rustc_intrinsic_must_be_overridden]
3851
3844
pub const unsafe fn copysignf64 ( _x : f64 , _y : f64 ) -> f64 {
@@ -3857,8 +3850,7 @@ pub const unsafe fn copysignf64(_x: f64, _y: f64) -> f64 {
3857
3850
/// The stabilized version of this intrinsic is
3858
3851
/// [`f128::copysign`](../../std/primitive.f128.html#method.copysign)
3859
3852
#[ rustc_nounwind]
3860
- // #[rustc_const_unstable(feature = "const_float_methods", issue = "130843")]
3861
- #[ rustc_const_unstable( feature = "f128" , issue = "116909" ) ]
3853
+ #[ cfg_attr( bootstrap, rustc_const_unstable( feature = "f128" , issue = "116909" ) ) ]
3862
3854
#[ rustc_intrinsic]
3863
3855
#[ rustc_intrinsic_must_be_overridden]
3864
3856
pub const unsafe fn copysignf128 ( _x : f128 , _y : f128 ) -> f128 {
0 commit comments