@@ -516,7 +516,7 @@ impl f32 {
516516/// ```
517517#[ must_use]
518518#[ stable( feature = "rust1" , since = "1.0.0" ) ]
519- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
519+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
520520#[ inline]
521521#[ allow( clippy:: eq_op) ] // > if you intended to check if the operand is NaN, use `.is_nan()` instead :)
522522pub const fn is_nan ( self ) -> bool {
@@ -527,7 +527,6 @@ impl f32 {
527527// concerns about portability, so this implementation is for
528528// private use internally.
529529#[ inline]
530- #[ rustc_const_unstable( feature = "const_float_classify" , issue = "72505" ) ]
531530pub ( crate ) const fn abs_private ( self ) -> f32 {
532531// SAFETY: This transmutation is fine just like in `to_bits`/`from_bits`.
533532unsafe { mem:: transmute :: < u32 , f32 > ( mem:: transmute :: < f32 , u32 > ( self ) & !Self :: SIGN_MASK ) }
@@ -550,7 +549,7 @@ impl f32 {
550549/// ```
551550#[ must_use]
552551#[ stable( feature = "rust1" , since = "1.0.0" ) ]
553- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
552+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
554553#[ inline]
555554pub const fn is_infinite ( self ) -> bool {
556555// Getting clever with transmutation can result in incorrect answers on some FPUs
@@ -575,7 +574,7 @@ impl f32 {
575574/// ```
576575#[ must_use]
577576#[ stable( feature = "rust1" , since = "1.0.0" ) ]
578- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
577+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
579578#[ inline]
580579pub const fn is_finite ( self ) -> bool {
581580// There's no need to handle NaN separately: if self is NaN,
@@ -603,7 +602,7 @@ impl f32 {
603602/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
604603#[ must_use]
605604#[ stable( feature = "is_subnormal" , since = "1.53.0" ) ]
606- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
605+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
607606#[ inline]
608607pub const fn is_subnormal ( self ) -> bool {
609608matches ! ( self . classify( ) , FpCategory :: Subnormal )
@@ -630,7 +629,7 @@ impl f32 {
630629/// [subnormal]: https://en.wikipedia.org/wiki/Denormal_number
631630#[ must_use]
632631#[ stable( feature = "rust1" , since = "1.0.0" ) ]
633- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
632+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
634633#[ inline]
635634pub const fn is_normal ( self ) -> bool {
636635matches ! ( self . classify( ) , FpCategory :: Normal )
@@ -650,7 +649,7 @@ impl f32 {
650649/// assert_eq!(inf.classify(), FpCategory::Infinite);
651650/// ```
652651#[ stable( feature = "rust1" , since = "1.0.0" ) ]
653- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
652+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
654653pub const fn classify ( self ) -> FpCategory {
655654// A previous implementation tried to only use bitmask-based checks,
656655// using f32::to_bits to transmute the float to its bit repr and match on that.
@@ -710,7 +709,7 @@ impl f32 {
710709/// ```
711710#[ must_use]
712711#[ stable( feature = "rust1" , since = "1.0.0" ) ]
713- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
712+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
714713#[ inline]
715714pub const fn is_sign_positive ( self ) -> bool {
716715 !self . is_sign_negative ( )
@@ -735,7 +734,7 @@ impl f32 {
735734/// ```
736735#[ must_use]
737736#[ stable( feature = "rust1" , since = "1.0.0" ) ]
738- #[ rustc_const_unstable ( feature = "const_float_classify" , issue = "72505 " ) ]
737+ #[ rustc_const_stable ( feature = "const_float_classify" , since = "CURRENT_RUSTC_VERSION " ) ]
739738#[ inline]
740739pub const fn is_sign_negative ( self ) -> bool {
741740// IEEE754 says: isSignMinus(x) is true if and only if x has negative sign. isSignMinus
0 commit comments