diff options
| author | bors <bors@rust-lang.org> | 2021-04-26 05:41:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-26 05:41:04 +0000 |
| commit | 4f0b24fd73ec5f80cf61c4bad30538634660ce9a (patch) | |
| tree | b7da5de2c30fb039029b332d497e87bc8ca4ddbc | |
| parent | ee8382f297bcf15a1e3680f54bd30ce4d1446b76 (diff) | |
| parent | 34e51279ab5ea725431d930736b3a97cd22ad286 (diff) | |
| download | rust-4f0b24fd73ec5f80cf61c4bad30538634660ce9a.tar.gz rust-4f0b24fd73ec5f80cf61c4bad30538634660ce9a.zip | |
Auto merge of #84543 - paolobarbolini:reverse_bits-const-since, r=m-ou-se
Fix 'const-stable since' of reverse_bits This fixes the const_stable `since` of `reverse_bits` for the signed and unsigned integer types. The previous value was incorrect, as it pointed to an older version where `reverse_bits` hadn't been stabilized yet. `reverse_bits` was const-stable from the start, as can be seen from: https://doc.rust-lang.org/1.37.0/std/primitive.u32.html#method.reverse_bits https://doc.rust-lang.org/1.37.0/std/primitive.i32.html#method.reverse_bits
| -rw-r--r-- | library/core/src/num/int_macros.rs | 2 | ||||
| -rw-r--r-- | library/core/src/num/uint_macros.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 608deb49a9d..4b341132e31 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -254,7 +254,7 @@ macro_rules! int_impl { #[doc = concat!("assert_eq!(0, 0", stringify!($SelfT), ".reverse_bits());")] /// ``` #[stable(feature = "reverse_bits", since = "1.37.0")] - #[rustc_const_stable(feature = "const_int_methods", since = "1.32.0")] + #[rustc_const_stable(feature = "const_int_methods", since = "1.37.0")] #[inline(always)] #[must_use] pub const fn reverse_bits(self) -> Self { diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 46638ea4463..08d9161eff1 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -257,7 +257,7 @@ macro_rules! uint_impl { #[doc = concat!("assert_eq!(0, 0", stringify!($SelfT), ".reverse_bits());")] /// ``` #[stable(feature = "reverse_bits", since = "1.37.0")] - #[rustc_const_stable(feature = "const_math", since = "1.32.0")] + #[rustc_const_stable(feature = "const_math", since = "1.37.0")] #[inline(always)] #[must_use] pub const fn reverse_bits(self) -> Self { |
