Add unstable feature attribute for unsigned const saturating add/sub intrinsics #58030
This commit is contained in:
parent
17998961d4
commit
da13fbda5e
1 changed files with 2 additions and 0 deletions
|
|
@ -2816,6 +2816,7 @@ assert_eq!(200u8.saturating_add(127), 255);", $EndFeature, "
|
|||
```"),
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub const fn saturating_add(self, rhs: Self) -> Self {
|
||||
|
|
@ -2859,6 +2860,7 @@ Basic usage:
|
|||
assert_eq!(13", stringify!($SelfT), ".saturating_sub(127), 0);", $EndFeature, "
|
||||
```"),
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[rustc_const_unstable(feature = "const_saturating_int_methods")]
|
||||
#[inline]
|
||||
#[cfg(not(stage0))]
|
||||
pub const fn saturating_sub(self, rhs: Self) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue