@@ -1591,6 +1591,7 @@ pub mod math {
1591
1591
/// [`f32::floor`]: ../../../std/primitive.f32.html#method.floor
1592
1592
#[ inline]
1593
1593
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1594
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1594
1595
#[ must_use = "method returns a new number and does not mutate the original value" ]
1595
1596
pub const fn floor ( x : f32 ) -> f32 {
1596
1597
// SAFETY: intrinsic with no preconditions
@@ -1621,6 +1622,7 @@ pub mod math {
1621
1622
#[ doc( alias = "ceiling" ) ]
1622
1623
#[ must_use = "method returns a new number and does not mutate the original value" ]
1623
1624
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1625
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1624
1626
pub const fn ceil ( x : f32 ) -> f32 {
1625
1627
// SAFETY: intrinsic with no preconditions
1626
1628
unsafe { intrinsics:: ceilf32 ( x) }
@@ -1654,6 +1656,7 @@ pub mod math {
1654
1656
/// [`f32::round`]: ../../../std/primitive.f32.html#method.round
1655
1657
#[ inline]
1656
1658
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1659
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1657
1660
#[ must_use = "method returns a new number and does not mutate the original value" ]
1658
1661
pub const fn round ( x : f32 ) -> f32 {
1659
1662
// SAFETY: intrinsic with no preconditions
@@ -1687,6 +1690,7 @@ pub mod math {
1687
1690
/// [`f32::round_ties_even`]: ../../../std/primitive.f32.html#method.round_ties_even
1688
1691
#[ inline]
1689
1692
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1693
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1690
1694
#[ must_use = "method returns a new number and does not mutate the original value" ]
1691
1695
pub const fn round_ties_even ( x : f32 ) -> f32 {
1692
1696
intrinsics:: round_ties_even_f32 ( x)
@@ -1718,6 +1722,7 @@ pub mod math {
1718
1722
#[ doc( alias = "truncate" ) ]
1719
1723
#[ must_use = "method returns a new number and does not mutate the original value" ]
1720
1724
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1725
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1721
1726
pub const fn trunc ( x : f32 ) -> f32 {
1722
1727
// SAFETY: intrinsic with no preconditions
1723
1728
unsafe { intrinsics:: truncf32 ( x) }
@@ -1747,6 +1752,7 @@ pub mod math {
1747
1752
/// [`f32::fract`]: ../../../std/primitive.f32.html#method.fract
1748
1753
#[ inline]
1749
1754
#[ unstable( feature = "core_float_math" , issue = "137578" ) ]
1755
+ #[ rustc_const_stable( feature = "core_float_math" , issue = "137578" ) ]
1750
1756
#[ must_use = "method returns a new number and does not mutate the original value" ]
1751
1757
pub const fn fract ( x : f32 ) -> f32 {
1752
1758
x - trunc ( x)
0 commit comments