Skip to content

Commit

Permalink
Add unstable feature attribute for unsigned const saturating add/sub …
Browse files Browse the repository at this point in the history
…intrinsics #58030
  • Loading branch information
pmccarter committed Feb 7, 2019
1 parent 1799896 commit da13fbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libcore/num/mod.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit da13fbd

Please sign in to comment.