diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index 0012bf79a1f5d..061e29048e213 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -44,7 +44,7 @@ use std::cmp::max; use std::marker::PhantomData; use std::sync::Arc; use std::sync::atomic::Ordering; -use std::{iter, mem, u64}; +use std::{iter, mem}; use rustc_data_structures::fingerprint::{Fingerprint, PackedFingerprint}; use rustc_data_structures::fx::FxHashMap; diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 3f391fe2c1de8..7cef3cb65b32c 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -72,7 +72,7 @@ // Lints: #![deny(unsafe_op_in_unsafe_fn)] #![deny(fuzzy_provenance_casts)] -#![warn(deprecated_in_future)] +#![warn(deprecated)] #![warn(missing_debug_implementations)] #![warn(missing_docs)] #![allow(explicit_outlives_requirements)] diff --git a/library/alloctests/lib.rs b/library/alloctests/lib.rs index 73c25679d05ba..0bd96a8d3f511 100644 --- a/library/alloctests/lib.rs +++ b/library/alloctests/lib.rs @@ -4,7 +4,7 @@ #![no_std] // Lints: #![deny(unsafe_op_in_unsafe_fn)] -#![warn(deprecated_in_future)] +#![warn(deprecated)] #![warn(missing_debug_implementations)] #![allow(explicit_outlives_requirements)] #![allow(internal_features)] diff --git a/library/compiler-builtins/libm/src/math/rem_pio2f.rs b/library/compiler-builtins/libm/src/math/rem_pio2f.rs index 0472a10355a03..481f7ee830bbb 100644 --- a/library/compiler-builtins/libm/src/math/rem_pio2f.rs +++ b/library/compiler-builtins/libm/src/math/rem_pio2f.rs @@ -14,8 +14,6 @@ * ==================================================== */ -use core::f64; - use super::rem_pio2_large; const TOINT: f64 = 1.5 / f64::EPSILON; diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index 9d608d5e83c40..d454a3b6f975b 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -15,7 +15,7 @@ pub use self::layout::Layout; note = "Name does not follow std convention, use LayoutError", suggestion = "LayoutError" )] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use self::layout::LayoutErr; #[stable(feature = "alloc_layout_error", since = "1.50.0")] pub use self::layout::LayoutError; diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index ef85e36900869..0cdf2da1ae798 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -80,7 +80,7 @@ #![deny(rust_2021_incompatible_or_patterns)] #![deny(unsafe_op_in_unsafe_fn)] #![deny(fuzzy_provenance_casts)] -#![warn(deprecated_in_future)] +#![warn(deprecated)] #![warn(missing_debug_implementations)] #![warn(missing_docs)] #![allow(explicit_outlives_requirements)] @@ -258,11 +258,11 @@ mod internal_macros; 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"] @@ -374,7 +374,7 @@ pub mod primitive; unused_imports, unsafe_op_in_unsafe_fn, ambiguous_glob_reexports, - deprecated_in_future, + deprecated, unreachable_pub )] #[allow(rustdoc::bare_urls)] diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 3070e1dedbe43..4e963638d798f 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -23,14 +23,14 @@ use crate::{cfg_select, intrinsics, mem}; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let r = std::f32::RADIX; /// /// // intended way /// 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.93.0", note = "replaced by the `RADIX` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_radix"] pub const RADIX: u32 = f32::RADIX; @@ -41,7 +41,7 @@ pub const RADIX: u32 = f32::RADIX; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let d = std::f32::MANTISSA_DIGITS; /// /// // intended way @@ -49,7 +49,7 @@ pub const RADIX: u32 = f32::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "TBD", + since = "1.93.0", note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`" )] #[rustc_diagnostic_item = "f32_legacy_const_mantissa_dig"] @@ -62,14 +62,14 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let d = std::f32::DIGITS; /// /// // intended way /// 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.93.0", note = "replaced by the `DIGITS` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_digits"] pub const DIGITS: u32 = f32::DIGITS; @@ -84,14 +84,14 @@ pub const DIGITS: u32 = f32::DIGITS; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let e = std::f32::EPSILON; /// /// // intended way /// 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.93.0", note = "replaced by the `EPSILON` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_epsilon"] pub const EPSILON: f32 = f32::EPSILON; @@ -102,14 +102,14 @@ pub const EPSILON: f32 = f32::EPSILON; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f32::MIN; /// /// // intended way /// 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.93.0", note = "replaced by the `MIN` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_min"] pub const MIN: f32 = f32::MIN; @@ -120,14 +120,17 @@ pub const MIN: f32 = f32::MIN; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f32::MIN_POSITIVE; /// /// // intended way /// 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.93.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; @@ -138,14 +141,14 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f32::MAX; /// /// // intended way /// 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.93.0", note = "replaced by the `MAX` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_max"] pub const MAX: f32 = f32::MAX; @@ -156,14 +159,14 @@ pub const MAX: f32 = f32::MAX; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f32::MIN_EXP; /// /// // intended way /// 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.93.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; @@ -174,14 +177,14 @@ pub const MIN_EXP: i32 = f32::MIN_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f32::MAX_EXP; /// /// // intended way /// 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.93.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; @@ -192,14 +195,14 @@ pub const MAX_EXP: i32 = f32::MAX_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f32::MIN_10_EXP; /// /// // intended way /// 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.93.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; @@ -210,14 +213,14 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f32::MAX_10_EXP; /// /// // intended way /// 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.93.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; @@ -228,14 +231,14 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let nan = std::f32::NAN; /// /// // intended way /// 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.93.0", note = "replaced by the `NAN` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_nan"] pub const NAN: f32 = f32::NAN; @@ -246,14 +249,14 @@ pub const NAN: f32 = f32::NAN; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let inf = std::f32::INFINITY; /// /// // intended way /// 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.93.0", note = "replaced by the `INFINITY` associated constant on `f32`")] #[rustc_diagnostic_item = "f32_legacy_const_infinity"] pub const INFINITY: f32 = f32::INFINITY; @@ -264,14 +267,17 @@ pub const INFINITY: f32 = f32::INFINITY; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let ninf = std::f32::NEG_INFINITY; /// /// // intended way /// 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.93.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; diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs index dc8ccc551b2da..809fdb07d77bb 100644 --- a/library/core/src/num/f64.rs +++ b/library/core/src/num/f64.rs @@ -23,14 +23,14 @@ use crate::{intrinsics, mem}; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let r = std::f64::RADIX; /// /// // intended way /// 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.93.0", note = "replaced by the `RADIX` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_radix"] pub const RADIX: u32 = f64::RADIX; @@ -41,7 +41,7 @@ pub const RADIX: u32 = f64::RADIX; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let d = std::f64::MANTISSA_DIGITS; /// /// // intended way @@ -49,7 +49,7 @@ pub const RADIX: u32 = f64::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[deprecated( - since = "TBD", + since = "1.93.0", note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`" )] #[rustc_diagnostic_item = "f64_legacy_const_mantissa_dig"] @@ -62,14 +62,14 @@ pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let d = std::f64::DIGITS; /// /// // intended way /// 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.93.0", note = "replaced by the `DIGITS` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_digits"] pub const DIGITS: u32 = f64::DIGITS; @@ -84,14 +84,14 @@ pub const DIGITS: u32 = f64::DIGITS; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let e = std::f64::EPSILON; /// /// // intended way /// 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.93.0", note = "replaced by the `EPSILON` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_epsilon"] pub const EPSILON: f64 = f64::EPSILON; @@ -102,14 +102,14 @@ pub const EPSILON: f64 = f64::EPSILON; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f64::MIN; /// /// // intended way /// 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.93.0", note = "replaced by the `MIN` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_min"] pub const MIN: f64 = f64::MIN; @@ -120,14 +120,17 @@ pub const MIN: f64 = f64::MIN; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f64::MIN_POSITIVE; /// /// // intended way /// 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.93.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; @@ -138,14 +141,14 @@ pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f64::MAX; /// /// // intended way /// 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.93.0", note = "replaced by the `MAX` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_max"] pub const MAX: f64 = f64::MAX; @@ -156,14 +159,14 @@ pub const MAX: f64 = f64::MAX; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f64::MIN_EXP; /// /// // intended way /// 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.93.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; @@ -174,14 +177,14 @@ pub const MIN_EXP: i32 = f64::MIN_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f64::MAX_EXP; /// /// // intended way /// 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.93.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; @@ -192,14 +195,14 @@ pub const MAX_EXP: i32 = f64::MAX_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let min = std::f64::MIN_10_EXP; /// /// // intended way /// 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.93.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; @@ -210,14 +213,14 @@ pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let max = std::f64::MAX_10_EXP; /// /// // intended way /// 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.93.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; @@ -228,14 +231,14 @@ pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let nan = std::f64::NAN; /// /// // intended way /// 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.93.0", note = "replaced by the `NAN` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_nan"] pub const NAN: f64 = f64::NAN; @@ -246,14 +249,14 @@ pub const NAN: f64 = f64::NAN; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let inf = std::f64::INFINITY; /// /// // intended way /// 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.93.0", note = "replaced by the `INFINITY` associated constant on `f64`")] #[rustc_diagnostic_item = "f64_legacy_const_infinity"] pub const INFINITY: f64 = f64::INFINITY; @@ -264,14 +267,17 @@ pub const INFINITY: f64 = f64::INFINITY; /// /// ```rust /// // deprecated way -/// # #[allow(deprecated, deprecated_in_future)] +/// # #[allow(deprecated)] /// let ninf = std::f64::NEG_INFINITY; /// /// // intended way /// 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.93.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; diff --git a/library/core/src/num/int_macros.rs b/library/core/src/num/int_macros.rs index 93fdf2823aeb7..e12cb8d8b229a 100644 --- a/library/core/src/num/int_macros.rs +++ b/library/core/src/num/int_macros.rs @@ -3852,7 +3852,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.93.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 @@ -3866,7 +3866,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.93.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 diff --git a/library/core/src/num/shells/legacy_int_modules.rs b/library/core/src/num/shells/legacy_int_modules.rs index 6b4f253911157..2e49a58a8c319 100644 --- a/library/core/src/num/shells/legacy_int_modules.rs +++ b/library/core/src/num/shells/legacy_int_modules.rs @@ -5,7 +5,7 @@ macro_rules! legacy_int_module { ($T:ident, #[$attr:meta]) => ( #[$attr] #[deprecated( - since = "TBD", + since = "1.93.0", note = "all constants in this module replaced by associated constants on the type" )] #[rustc_diagnostic_item = concat!(stringify!($T), "_legacy_mod")] @@ -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.93.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; @@ -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.93.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; } diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs index 1d108cb0cf4a9..ad59d715d731b 100644 --- a/library/core/src/num/uint_macros.rs +++ b/library/core/src/num/uint_macros.rs @@ -3867,7 +3867,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.93.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 } @@ -3879,7 +3879,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.93.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 } } diff --git a/library/core/src/panic/panic_info.rs b/library/core/src/panic/panic_info.rs index 9d53567a26fd9..207275edc36cb 100644 --- a/library/core/src/panic/panic_info.rs +++ b/library/core/src/panic/panic_info.rs @@ -106,7 +106,7 @@ impl<'a> PanicInfo<'a> { /// [`std::panic::PanicHookInfo::payload`]: ../../std/panic/struct.PanicHookInfo.html#method.payload #[deprecated(since = "1.81.0", note = "this never returns anything useful")] #[stable(feature = "panic_hooks", since = "1.10.0")] - #[allow(deprecated, deprecated_in_future)] + #[allow(deprecated)] pub fn payload(&self) -> &(dyn crate::any::Any + Send) { struct NoPayload; &NoPayload diff --git a/library/coretests/tests/array.rs b/library/coretests/tests/array.rs index c4a8fc74feca3..bfc97f421a4c3 100644 --- a/library/coretests/tests/array.rs +++ b/library/coretests/tests/array.rs @@ -646,7 +646,7 @@ fn array_mixed_equality_integers() { #[test] fn array_mixed_equality_nans() { - let array3: [f32; 3] = [1.0, std::f32::NAN, 3.0]; + let array3: [f32; 3] = [1.0, f32::NAN, 3.0]; let slice3: &[f32] = &{ array3 }; assert!(!(array3 == slice3)); diff --git a/library/coretests/tests/num/int_macros.rs b/library/coretests/tests/num/int_macros.rs index 37336f49ef1b6..aed5453577e0e 100644 --- a/library/coretests/tests/num/int_macros.rs +++ b/library/coretests/tests/num/int_macros.rs @@ -2,8 +2,9 @@ macro_rules! int_module { ($T:ident, $U:ident) => { use core::num::ParseIntError; use core::ops::{BitAnd, BitOr, BitXor, Not, Shl, Shr}; - use core::$T::*; + const MAX: $T = $T::MAX; + const MIN: $T = $T::MIN; const UMAX: $U = $U::MAX; use crate::num; diff --git a/library/coretests/tests/num/uint_macros.rs b/library/coretests/tests/num/uint_macros.rs index b89a371efcc25..02ed36779210e 100644 --- a/library/coretests/tests/num/uint_macros.rs +++ b/library/coretests/tests/num/uint_macros.rs @@ -2,7 +2,9 @@ macro_rules! uint_module { ($T:ident) => { use core::num::ParseIntError; use core::ops::{BitAnd, BitOr, BitXor, Not, Shl, Shr}; - use core::$T::*; + + const MAX: $T = $T::MAX; + const MIN: $T = $T::MIN; use crate::num; diff --git a/library/std/src/env.rs b/library/std/src/env.rs index fd662e8a663a9..1faace69c7fb4 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -591,7 +591,7 @@ impl fmt::Display for JoinPathsError { #[stable(feature = "env", since = "1.0.0")] impl Error for JoinPathsError { - #[allow(deprecated, deprecated_in_future)] + #[allow(deprecated)] fn description(&self) -> &str { self.inner.description() } diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 07618550a9cb2..dc64c7e139257 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -239,7 +239,7 @@ #![needs_panic_runtime] // // Lints: -#![warn(deprecated_in_future)] +#![warn(deprecated)] #![warn(missing_docs)] #![warn(missing_debug_implementations)] #![allow(explicit_outlives_requirements)] @@ -502,24 +502,24 @@ pub use core::future; #[stable(feature = "core_hint", since = "1.27.0")] pub use core::hint; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::i8; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::i16; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::i32; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::i64; #[stable(feature = "i128", since = "1.26.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::i128; #[stable(feature = "rust1", since = "1.0.0")] pub use core::intrinsics; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::isize; #[stable(feature = "rust1", since = "1.0.0")] pub use core::iter; @@ -540,24 +540,24 @@ pub use core::range; #[stable(feature = "rust1", since = "1.0.0")] pub use core::result; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::u8; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::u16; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::u32; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::u64; #[stable(feature = "i128", since = "1.26.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::u128; #[unstable(feature = "unsafe_binders", issue = "130516")] pub use core::unsafe_binder; #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::usize; #[stable(feature = "rust1", since = "1.0.0")] @@ -707,12 +707,12 @@ pub use core::cfg_select; )] pub use core::concat_bytes; #[stable(feature = "matches_macro", since = "1.42.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::matches; #[stable(feature = "core_primitive", since = "1.43.0")] pub use core::primitive; #[stable(feature = "todo_macro", since = "1.40.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::todo; // Re-export built-in macros defined through core. #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] @@ -723,7 +723,7 @@ pub use core::{ }; // Re-export macros defined in core. #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::{ assert_eq, assert_ne, debug_assert, debug_assert_eq, debug_assert_ne, r#try, unimplemented, unreachable, write, writeln, diff --git a/library/std/src/num/f32.rs b/library/std/src/num/f32.rs index 09ced388a3399..cd094859c31f0 100644 --- a/library/std/src/num/f32.rs +++ b/library/std/src/num/f32.rs @@ -13,7 +13,7 @@ #![allow(missing_docs)] #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::f32::{ DIGITS, EPSILON, INFINITY, MANTISSA_DIGITS, MAX, MAX_10_EXP, MAX_EXP, MIN, MIN_10_EXP, MIN_EXP, MIN_POSITIVE, NAN, NEG_INFINITY, RADIX, consts, diff --git a/library/std/src/num/f64.rs b/library/std/src/num/f64.rs index 79adf076e4b1a..4b89cf95a0419 100644 --- a/library/std/src/num/f64.rs +++ b/library/std/src/num/f64.rs @@ -13,7 +13,7 @@ #![allow(missing_docs)] #[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated, deprecated_in_future)] +#[allow(deprecated)] pub use core::f64::{ DIGITS, EPSILON, INFINITY, MANTISSA_DIGITS, MAX, MAX_10_EXP, MAX_EXP, MIN, MIN_10_EXP, MIN_EXP, MIN_POSITIVE, NAN, NEG_INFINITY, RADIX, consts, diff --git a/library/std/tests/time.rs b/library/std/tests/time.rs index be1948af91564..4e68cdb8375a0 100644 --- a/library/std/tests/time.rs +++ b/library/std/tests/time.rs @@ -118,7 +118,7 @@ fn instant_checked_duration_since_nopanic() { #[test] fn instant_saturating_duration_since_nopanic() { let a = Instant::now(); - #[allow(deprecated, deprecated_in_future)] + #[allow(deprecated)] let ret = (a - Duration::SECOND).saturating_duration_since(a); assert_eq!(ret, Duration::ZERO); } diff --git a/src/tools/rustfmt/src/vertical.rs b/src/tools/rustfmt/src/vertical.rs index 1ec239c382100..0edbb61eb3b3b 100644 --- a/src/tools/rustfmt/src/vertical.rs +++ b/src/tools/rustfmt/src/vertical.rs @@ -198,7 +198,7 @@ fn struct_field_prefix_max_min_width( .rewrite_prefix(context, shape) .map(|field_str| trimmed_last_line_width(&field_str)) }) - .fold_ok((0, ::std::usize::MAX), |(max_len, min_len), len| { + .fold_ok((0, usize::MAX), |(max_len, min_len), len| { (cmp::max(max_len, len), cmp::min(min_len, len)) }) .unwrap_or((0, 0)) diff --git a/tests/ui/consts/issue-90762.rs b/tests/ui/consts/issue-90762.rs index db40e50d4995f..cc060366b80bf 100644 --- a/tests/ui/consts/issue-90762.rs +++ b/tests/ui/consts/issue-90762.rs @@ -27,5 +27,5 @@ fn main() { for (i, b) in FOO.iter().enumerate() { assert!(b.load(Ordering::Relaxed), "{} not set", i); } - assert_eq!(BAR.fetch_add(1, Ordering::Relaxed), usize::max_value()); + assert_eq!(BAR.fetch_add(1, Ordering::Relaxed), usize::MAX); }