diff options
Diffstat (limited to 'src/libcore/num/int_macros.rs')
| -rw-r--r-- | src/libcore/num/int_macros.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs index 61dcbdff016..77f662723c8 100644 --- a/src/libcore/num/int_macros.rs +++ b/src/libcore/num/int_macros.rs @@ -17,6 +17,8 @@ macro_rules! int_module { ($T:ty, $bits:expr) => ( #[unstable(feature = "num_bits_bytes", reason = "may want to be an associated function", issue = "27753")] +#[rustc_deprecated(since = "1.7.0", + reason = "will be replaced via const fn or associated constants")] #[allow(missing_docs)] pub const BITS : usize = $bits; // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of @@ -24,6 +26,8 @@ pub const BITS : usize = $bits; #[unstable(feature = "num_bits_bytes", reason = "may want to be an associated function", issue = "27753")] +#[rustc_deprecated(since = "1.7.0", + reason = "will be replaced via const fn or associated constants")] #[allow(missing_docs)] pub const BYTES : usize = ($bits / 8); @@ -31,7 +35,7 @@ pub const BYTES : usize = ($bits / 8); // calling the `Bounded::min_value` function. #[stable(feature = "rust1", since = "1.0.0")] #[allow(missing_docs)] -pub const MIN: $T = (-1 as $T) << (BITS - 1); +pub const MIN: $T = (-1 as $T) << ($bits - 1); // FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0. // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of // calling the `Bounded::max_value` function. |
