diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-05-30 18:51:47 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-05-31 04:43:53 +0000 |
| commit | 1c26bbf6283baefa7d6f598d693c57bcec4c3450 (patch) | |
| tree | 6c72f15fd2c8a378a1700ecd8954afa1abc2db12 /src/libcore/num | |
| parent | 3ade426ede7bca4a74bc641a12f2e7fe2cc20c47 (diff) | |
| download | rust-1c26bbf6283baefa7d6f598d693c57bcec4c3450.tar.gz rust-1c26bbf6283baefa7d6f598d693c57bcec4c3450.zip | |
Stabilize reverse_bits feature
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 9 | ||||
| -rw-r--r-- | src/libcore/num/wrapping.rs | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7ec75ed0114..7145bf1fbc0 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -463,15 +463,12 @@ assert_eq!(m, ", $swapped, "); Basic usage: ``` -#![feature(reverse_bits)] - let n = ", $swap_op, stringify!($SelfT), "; let m = n.reverse_bits(); assert_eq!(m, ", $reversed, "); ```"), - #[unstable(feature = "reverse_bits", issue = "48763")] - #[rustc_const_unstable(feature = "const_int_conversion")] + #[stable(feature = "reverse_bits", since = "1.37.0")] #[inline] #[must_use] pub const fn reverse_bits(self) -> Self { @@ -2514,14 +2511,12 @@ assert_eq!(m, ", $swapped, "); Basic usage: ``` -#![feature(reverse_bits)] - let n = ", $swap_op, stringify!($SelfT), "; let m = n.reverse_bits(); assert_eq!(m, ", $reversed, "); ```"), - #[unstable(feature = "reverse_bits", issue = "48763")] + #[stable(feature = "reverse_bits", since = "1.37.0")] #[inline] #[must_use] pub const fn reverse_bits(self) -> Self { diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index 5eb5ec558f8..fd129a306d1 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -511,7 +511,6 @@ assert_eq!(n.trailing_zeros(), 3); /// Basic usage: /// /// ``` - /// #![feature(reverse_bits)] /// use std::num::Wrapping; /// /// let n = Wrapping(0b0000000_01010101i16); @@ -522,7 +521,7 @@ assert_eq!(n.trailing_zeros(), 3); /// assert_eq!(m.0 as u16, 0b10101010_00000000); /// assert_eq!(m, Wrapping(-22016)); /// ``` - #[unstable(feature = "reverse_bits", issue = "48763")] + #[stable(feature = "reverse_bits", since = "1.37.0")] #[inline] #[must_use] pub const fn reverse_bits(self) -> Self { |
