mirror of
https://github.com/rust-lang/rust
synced 2024-09-15 22:50:55 +00:00
Change the type of constants BYTES/BITS to usize
This commit is contained in:
parent
f55d03c8d8
commit
5825c72e73
|
@ -15,11 +15,11 @@ macro_rules! int_module { ($T:ty, $bits:expr) => (
|
|||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "core")]
|
||||
pub const BITS : u32 = $bits;
|
||||
pub const BITS : usize = $bits;
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "core")]
|
||||
pub const BYTES : u32 = ($bits / 8);
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `Bounded::min_value` function.
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
|
||||
|
||||
#[unstable(feature = "core")]
|
||||
pub const BITS : u32 = $bits;
|
||||
pub const BITS : usize = $bits;
|
||||
#[unstable(feature = "core")]
|
||||
pub const BYTES : u32 = ($bits / 8);
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub const MIN: $T = 0 as $T;
|
||||
|
|
Loading…
Reference in a new issue