@@ -569,7 +569,6 @@ impl f32 {
569
569
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
570
570
#[ rustc_const_stable( feature = "const_float_classify" , since = "1.83.0" ) ]
571
571
#[ inline]
572
- #[ rustc_allow_const_fn_unstable( const_float_methods) ] // for `abs`
573
572
pub const fn is_finite ( self ) -> bool {
574
573
// There's no need to handle NaN separately: if self is NaN,
575
574
// the comparison is not true, exactly as desired.
@@ -819,7 +818,7 @@ impl f32 {
819
818
/// ```
820
819
#[ must_use = "this returns the result of the operation, without modifying the original" ]
821
820
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
822
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
821
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
823
822
#[ inline]
824
823
pub const fn recip ( self ) -> f32 {
825
824
1.0 / self
@@ -837,7 +836,7 @@ impl f32 {
837
836
#[ must_use = "this returns the result of the operation, \
838
837
without modifying the original"]
839
838
#[ stable( feature = "f32_deg_rad_conversions" , since = "1.7.0" ) ]
840
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
839
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
841
840
#[ inline]
842
841
pub const fn to_degrees ( self ) -> f32 {
843
842
// Use a constant for better precision.
@@ -857,7 +856,7 @@ impl f32 {
857
856
#[ must_use = "this returns the result of the operation, \
858
857
without modifying the original"]
859
858
#[ stable( feature = "f32_deg_rad_conversions" , since = "1.7.0" ) ]
860
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
859
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
861
860
#[ inline]
862
861
pub const fn to_radians ( self ) -> f32 {
863
862
const RADS_PER_DEG : f32 = consts:: PI / 180.0 ;
@@ -879,7 +878,7 @@ impl f32 {
879
878
/// ```
880
879
#[ must_use = "this returns the result of the comparison, without modifying either input" ]
881
880
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
882
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
881
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
883
882
#[ inline]
884
883
pub const fn max ( self , other : f32 ) -> f32 {
885
884
intrinsics:: maxnumf32 ( self , other)
@@ -900,7 +899,7 @@ impl f32 {
900
899
/// ```
901
900
#[ must_use = "this returns the result of the comparison, without modifying either input" ]
902
901
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
903
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
902
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
904
903
#[ inline]
905
904
pub const fn min ( self , other : f32 ) -> f32 {
906
905
intrinsics:: minnumf32 ( self , other)
@@ -1397,7 +1396,7 @@ impl f32 {
1397
1396
/// ```
1398
1397
#[ must_use = "method returns a new number and does not mutate the original value" ]
1399
1398
#[ stable( feature = "clamp" , since = "1.50.0" ) ]
1400
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
1399
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
1401
1400
#[ inline]
1402
1401
pub const fn clamp ( mut self , min : f32 , max : f32 ) -> f32 {
1403
1402
const_assert ! (
@@ -1434,7 +1433,7 @@ impl f32 {
1434
1433
/// ```
1435
1434
#[ must_use = "method returns a new number and does not mutate the original value" ]
1436
1435
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1437
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
1436
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
1438
1437
#[ inline]
1439
1438
pub const fn abs ( self ) -> f32 {
1440
1439
// SAFETY: this is actually a safe intrinsic
@@ -1459,7 +1458,7 @@ impl f32 {
1459
1458
/// ```
1460
1459
#[ must_use = "method returns a new number and does not mutate the original value" ]
1461
1460
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1462
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
1461
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
1463
1462
#[ inline]
1464
1463
pub const fn signum ( self ) -> f32 {
1465
1464
if self . is_nan ( ) { Self :: NAN } else { 1.0_f32 . copysign ( self ) }
@@ -1494,7 +1493,7 @@ impl f32 {
1494
1493
#[ must_use = "method returns a new number and does not mutate the original value" ]
1495
1494
#[ inline]
1496
1495
#[ stable( feature = "copysign" , since = "1.35.0" ) ]
1497
- #[ rustc_const_unstable ( feature = "const_float_methods" , issue = "130843 " ) ]
1496
+ #[ rustc_const_stable ( feature = "const_float_methods" , since = "CURRENT_RUSTC_VERSION " ) ]
1498
1497
pub const fn copysign ( self , sign : f32 ) -> f32 {
1499
1498
// SAFETY: this is actually a safe intrinsic
1500
1499
unsafe { intrinsics:: copysignf32 ( self , sign) }
0 commit comments