diff options
| author | Patrick McCarter <p.mccarter@gmail.com> | 2019-02-07 13:12:17 -0500 |
|---|---|---|
| committer | Patrick McCarter <p.mccarter@gmail.com> | 2019-02-07 13:12:17 -0500 |
| commit | 17998961d4d08d08be3cee5e09ca62b75b832f1a (patch) | |
| tree | 196ccb52f86f59c4934e77d5a36b488132a6fbe3 /src/libcore/num | |
| parent | d7efc76b7ef8c60aefd603dd4773b2fa039bab80 (diff) | |
| download | rust-17998961d4d08d08be3cee5e09ca62b75b832f1a.tar.gz rust-17998961d4d08d08be3cee5e09ca62b75b832f1a.zip | |
Refactor const saturating intrinsics emulation and add unstable feature attribute #58030
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 104b124bad4..d4fade76138 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -909,6 +909,7 @@ $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 { @@ -957,6 +958,7 @@ assert_eq!(", stringify!($SelfT), "::min_value().saturating_sub(100), ", stringi $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 { |
