Skip to content

Commit da13fbd

Browse files
committed
Add unstable feature attribute for unsigned const saturating add/sub intrinsics #58030
1 parent 1799896 commit da13fbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/num/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2816,6 +2816,7 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
28162816
```"),
28172817

28182818
#[stable(feature = "rust1", since = "1.0.0")]
2819+
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
28192820
#[inline]
28202821
#[cfg(not(stage0))]
28212822
pub const fn saturating_add(self, rhs: Self) -> Self {
@@ -2859,6 +2860,7 @@ Basic usage:
28592860
assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
28602861
```"),
28612862
#[stable(feature = "rust1", since = "1.0.0")]
2863+
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
28622864
#[inline]
28632865
#[cfg(not(stage0))]
28642866
pub const fn saturating_sub(self, rhs: Self) -> Self {

0 commit comments

Comments
 (0)