Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,10 @@ mod internal_macros;
#[path = "num/shells/legacy_int_modules.rs"]
mod legacy_int_modules;
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(clippy::useless_attribute)] // FIXME false positive (https://github.com/rust-lang/rust-clippy/issues/15636)
#[allow(deprecated_in_future)]
#[allow(deprecated)]
pub use legacy_int_modules::{i8, i16, i32, i64, isize, u8, u16, u32, u64, usize};
#[stable(feature = "i128", since = "1.26.0")]
#[allow(clippy::useless_attribute)] // FIXME false positive (https://github.com/rust-lang/rust-clippy/issues/15636)
#[allow(deprecated_in_future)]
#[allow(deprecated)]
pub use legacy_int_modules::{i128, u128};

#[path = "num/f128.rs"]
Expand Down
34 changes: 20 additions & 14 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::{cfg_select, intrinsics, mem};
/// let r = f32::RADIX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `RADIX` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_radix"]
pub const RADIX: u32 = f32::RADIX;

Expand All @@ -49,7 +49,7 @@ pub const RADIX: u32 = f32::RADIX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(
since = "TBD",
since = "1.92.0",
note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`"
)]
#[rustc_diagnostic_item = "f32_legacy_const_mantissa_dig"]
Expand All @@ -69,7 +69,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS;
/// let d = f32::DIGITS;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `DIGITS` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_digits"]
pub const DIGITS: u32 = f32::DIGITS;

Expand All @@ -91,7 +91,7 @@ pub const DIGITS: u32 = f32::DIGITS;
/// let e = f32::EPSILON;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `EPSILON` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_epsilon"]
pub const EPSILON: f32 = f32::EPSILON;

Expand All @@ -109,7 +109,7 @@ pub const EPSILON: f32 = f32::EPSILON;
/// let min = f32::MIN;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_min"]
pub const MIN: f32 = f32::MIN;

Expand All @@ -127,7 +127,10 @@ pub const MIN: f32 = f32::MIN;
/// let min = f32::MIN_POSITIVE;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f32`")]
#[deprecated(
since = "1.92.0",
note = "replaced by the `MIN_POSITIVE` associated constant on `f32`"
)]
#[rustc_diagnostic_item = "f32_legacy_const_min_positive"]
pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;

Expand All @@ -145,7 +148,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE;
/// let max = f32::MAX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_max"]
pub const MAX: f32 = f32::MAX;

Expand All @@ -163,7 +166,7 @@ pub const MAX: f32 = f32::MAX;
/// let min = f32::MIN_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN_EXP` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_min_exp"]
pub const MIN_EXP: i32 = f32::MIN_EXP;

Expand All @@ -181,7 +184,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP;
/// let max = f32::MAX_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX_EXP` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_max_exp"]
pub const MAX_EXP: i32 = f32::MAX_EXP;

Expand All @@ -199,7 +202,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP;
/// let min = f32::MIN_10_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_min_10_exp"]
pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;

Expand All @@ -217,7 +220,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP;
/// let max = f32::MAX_10_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_max_10_exp"]
pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;

Expand All @@ -235,7 +238,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP;
/// let nan = f32::NAN;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `NAN` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_nan"]
pub const NAN: f32 = f32::NAN;

Expand All @@ -253,7 +256,7 @@ pub const NAN: f32 = f32::NAN;
/// let inf = f32::INFINITY;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f32`")]
#[deprecated(since = "1.92.0", note = "replaced by the `INFINITY` associated constant on `f32`")]
#[rustc_diagnostic_item = "f32_legacy_const_infinity"]
pub const INFINITY: f32 = f32::INFINITY;

Expand All @@ -271,7 +274,10 @@ pub const INFINITY: f32 = f32::INFINITY;
/// let ninf = f32::NEG_INFINITY;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f32`")]
#[deprecated(
since = "1.92.0",
note = "replaced by the `NEG_INFINITY` associated constant on `f32`"
)]
#[rustc_diagnostic_item = "f32_legacy_const_neg_infinity"]
pub const NEG_INFINITY: f32 = f32::NEG_INFINITY;

Expand Down
34 changes: 20 additions & 14 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::{intrinsics, mem};
/// let r = f64::RADIX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `RADIX` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_radix"]
pub const RADIX: u32 = f64::RADIX;

Expand All @@ -49,7 +49,7 @@ pub const RADIX: u32 = f64::RADIX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(
since = "TBD",
since = "1.92.0",
note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`"
)]
#[rustc_diagnostic_item = "f64_legacy_const_mantissa_dig"]
Expand All @@ -69,7 +69,7 @@ pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS;
/// let d = f64::DIGITS;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `DIGITS` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_digits"]
pub const DIGITS: u32 = f64::DIGITS;

Expand All @@ -91,7 +91,7 @@ pub const DIGITS: u32 = f64::DIGITS;
/// let e = f64::EPSILON;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `EPSILON` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_epsilon"]
pub const EPSILON: f64 = f64::EPSILON;

Expand All @@ -109,7 +109,7 @@ pub const EPSILON: f64 = f64::EPSILON;
/// let min = f64::MIN;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_min"]
pub const MIN: f64 = f64::MIN;

Expand All @@ -127,7 +127,10 @@ pub const MIN: f64 = f64::MIN;
/// let min = f64::MIN_POSITIVE;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f64`")]
#[deprecated(
since = "1.92.0",
note = "replaced by the `MIN_POSITIVE` associated constant on `f64`"
)]
#[rustc_diagnostic_item = "f64_legacy_const_min_positive"]
pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE;

Expand All @@ -145,7 +148,7 @@ pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE;
/// let max = f64::MAX;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_max"]
pub const MAX: f64 = f64::MAX;

Expand All @@ -163,7 +166,7 @@ pub const MAX: f64 = f64::MAX;
/// let min = f64::MIN_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN_EXP` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_min_exp"]
pub const MIN_EXP: i32 = f64::MIN_EXP;

Expand All @@ -181,7 +184,7 @@ pub const MIN_EXP: i32 = f64::MIN_EXP;
/// let max = f64::MAX_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX_EXP` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_max_exp"]
pub const MAX_EXP: i32 = f64::MAX_EXP;

Expand All @@ -199,7 +202,7 @@ pub const MAX_EXP: i32 = f64::MAX_EXP;
/// let min = f64::MIN_10_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_min_10_exp"]
pub const MIN_10_EXP: i32 = f64::MIN_10_EXP;

Expand All @@ -217,7 +220,7 @@ pub const MIN_10_EXP: i32 = f64::MIN_10_EXP;
/// let max = f64::MAX_10_EXP;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_max_10_exp"]
pub const MAX_10_EXP: i32 = f64::MAX_10_EXP;

Expand All @@ -235,7 +238,7 @@ pub const MAX_10_EXP: i32 = f64::MAX_10_EXP;
/// let nan = f64::NAN;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `NAN` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_nan"]
pub const NAN: f64 = f64::NAN;

Expand All @@ -253,7 +256,7 @@ pub const NAN: f64 = f64::NAN;
/// let inf = f64::INFINITY;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f64`")]
#[deprecated(since = "1.92.0", note = "replaced by the `INFINITY` associated constant on `f64`")]
#[rustc_diagnostic_item = "f64_legacy_const_infinity"]
pub const INFINITY: f64 = f64::INFINITY;

Expand All @@ -271,7 +274,10 @@ pub const INFINITY: f64 = f64::INFINITY;
/// let ninf = f64::NEG_INFINITY;
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f64`")]
#[deprecated(
since = "1.92.0",
note = "replaced by the `NEG_INFINITY` associated constant on `f64`"
)]
#[rustc_diagnostic_item = "f64_legacy_const_neg_infinity"]
pub const NEG_INFINITY: f64 = f64::NEG_INFINITY;

Expand Down
4 changes: 2 additions & 2 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3830,7 +3830,7 @@ macro_rules! int_impl {
#[inline(always)]
#[rustc_promotable]
#[rustc_const_stable(feature = "const_min_value", since = "1.32.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_min_value")]
pub const fn min_value() -> Self {
Self::MIN
Expand All @@ -3844,7 +3844,7 @@ macro_rules! int_impl {
#[inline(always)]
#[rustc_promotable]
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_max_value")]
pub const fn max_value() -> Self {
Self::MAX
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/num/shells/legacy_int_modules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ macro_rules! legacy_int_module {
($T:ident, #[$attr:meta]) => (
#[$attr]
#[deprecated(
since = "TBD",
note = "all constants in this module replaced by associated constants on the type"
since = "1.92.0",
note = "all constants in this module replaced by associated constants on the type",
)]
#[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_mod")]
pub mod $T {
Expand All @@ -30,7 +30,7 @@ macro_rules! legacy_int_module {
/// ```
///
#[$attr]
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_min")]
pub const MIN: $T = $T::MIN;

Expand All @@ -50,7 +50,7 @@ macro_rules! legacy_int_module {
/// ```
///
#[$attr]
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_const_max")]
pub const MAX: $T = $T::MAX;
}
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3852,7 +3852,7 @@ macro_rules! uint_impl {
#[rustc_promotable]
#[inline(always)]
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MIN` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_min_value")]
pub const fn min_value() -> Self { Self::MIN }

Expand All @@ -3864,7 +3864,7 @@ macro_rules! uint_impl {
#[rustc_promotable]
#[inline(always)]
#[rustc_const_stable(feature = "const_max_value", since = "1.32.0")]
#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")]
#[deprecated(since = "1.92.0", note = "replaced by the `MAX` associated constant on this type")]
#[rustc_diagnostic_item = concat!(stringify!($SelfT), "_legacy_fn_max_value")]
pub const fn max_value() -> Self { Self::MAX }
}
Expand Down
Loading