Skip to content

Commit bed4525

Browse files
committed
fix: replace rustc_allow_const_fn_unstable(core_intrinsics) attribute with #[rustc_const_unstable(feature = "f128", issue = "116909")] in library/core/src/num/f128.rs
1 parent 74bb7ed commit bed4525

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

library/core/src/num/f128.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,8 +1447,8 @@ impl f128 {
14471447
#[inline]
14481448
#[rustc_allow_incoherent_impl]
14491449
#[unstable(feature = "f128", issue = "116909")]
1450+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
14501451
#[must_use = "method returns a new number and does not mutate the original value"]
1451-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
14521452
pub const fn floor(self) -> f128 {
14531453
// SAFETY: intrinsic with no preconditions
14541454
unsafe { intrinsics::floorf128(self) }
@@ -1478,8 +1478,8 @@ impl f128 {
14781478
#[doc(alias = "ceiling")]
14791479
#[rustc_allow_incoherent_impl]
14801480
#[unstable(feature = "f128", issue = "116909")]
1481+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
14811482
#[must_use = "method returns a new number and does not mutate the original value"]
1482-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
14831483
pub const fn ceil(self) -> f128 {
14841484
// SAFETY: intrinsic with no preconditions
14851485
unsafe { intrinsics::ceilf128(self) }
@@ -1515,8 +1515,8 @@ impl f128 {
15151515
#[inline]
15161516
#[rustc_allow_incoherent_impl]
15171517
#[unstable(feature = "f128", issue = "116909")]
1518+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
15181519
#[must_use = "method returns a new number and does not mutate the original value"]
1519-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
15201520
pub const fn round(self) -> f128 {
15211521
// SAFETY: intrinsic with no preconditions
15221522
unsafe { intrinsics::roundf128(self) }
@@ -1550,8 +1550,8 @@ impl f128 {
15501550
#[inline]
15511551
#[rustc_allow_incoherent_impl]
15521552
#[unstable(feature = "f128", issue = "116909")]
1553+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
15531554
#[must_use = "method returns a new number and does not mutate the original value"]
1554-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
15551555
pub const fn round_ties_even(self) -> f128 {
15561556
intrinsics::round_ties_even_f128(self)
15571557
}
@@ -1583,8 +1583,8 @@ impl f128 {
15831583
#[doc(alias = "truncate")]
15841584
#[rustc_allow_incoherent_impl]
15851585
#[unstable(feature = "f128", issue = "116909")]
1586+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
15861587
#[must_use = "method returns a new number and does not mutate the original value"]
1587-
#[rustc_allow_const_fn_unstable(core_intrinsics)]
15881588
pub const fn trunc(self) -> f128 {
15891589
// SAFETY: intrinsic with no preconditions
15901590
unsafe { intrinsics::truncf128(self) }
@@ -1615,6 +1615,7 @@ impl f128 {
16151615
#[inline]
16161616
#[rustc_allow_incoherent_impl]
16171617
#[unstable(feature = "f128", issue = "116909")]
1618+
#[rustc_const_unstable(feature = "f128", issue = "116909")]
16181619
#[must_use = "method returns a new number and does not mutate the original value"]
16191620
pub const fn fract(self) -> f128 {
16201621
self - self.trunc()

0 commit comments

Comments
 (0)