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
This commit is contained in:
bors 2021-04-26 05:41:04 +00:00
commit 4f0b24fd73
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {