From fd253a58e06df945953b2f60e12d1fe0751476bd Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Mon, 11 Apr 2022 21:40:31 -0400 Subject: [PATCH 1/2] Bump stdarch --- stdarch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdarch b/stdarch index bcbe01061..d215afe9d 160000 --- a/stdarch +++ b/stdarch @@ -1 +1 @@ -Subproject commit bcbe010614f398ec86f3a9274d22e33e5f2ee60b +Subproject commit d215afe9d1cf79c5edb0dfd3cdf4c50aca1f1760 From 3e9efa641f092e4d8060e783aa71ac0076816b93 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Thu, 7 Apr 2022 21:20:32 -0400 Subject: [PATCH 2/2] Remove use of `#[rustc_deprecated]` --- alloc/src/slice.rs | 2 +- core/src/alloc/layout.rs | 4 +-- core/src/alloc/mod.rs | 4 +-- core/src/array/iter.rs | 2 +- core/src/fmt/mod.rs | 6 ++-- core/src/hash/sip.rs | 31 ++++++----------- core/src/intrinsics.rs | 5 +-- core/src/macros/mod.rs | 12 ++----- core/src/mem/mod.rs | 6 ++-- core/src/num/f32.rs | 54 ++++++++-------------------- core/src/num/f64.rs | 58 +++++++++---------------------- core/src/num/int_macros.rs | 4 +-- core/src/num/shells/i128.rs | 4 +-- core/src/num/shells/i16.rs | 4 +-- core/src/num/shells/i32.rs | 4 +-- core/src/num/shells/i64.rs | 4 +-- core/src/num/shells/i8.rs | 4 +-- core/src/num/shells/int_macros.rs | 4 +-- core/src/num/shells/isize.rs | 4 +-- core/src/num/shells/u128.rs | 4 +-- core/src/num/shells/u16.rs | 4 +-- core/src/num/shells/u32.rs | 4 +-- core/src/num/shells/u64.rs | 4 +-- core/src/num/shells/u8.rs | 4 +-- core/src/num/shells/usize.rs | 4 +-- core/src/num/uint_macros.rs | 4 +-- core/src/str/iter.rs | 2 +- core/src/str/mod.rs | 26 +++++--------- core/src/sync/atomic.rs | 22 ++++++------ std/src/ascii.rs | 2 +- std/src/collections/mod.rs | 2 +- std/src/env.rs | 6 ++-- std/src/error.rs | 6 ++-- std/src/f32.rs | 16 ++++----- std/src/f64.rs | 16 ++++----- std/src/fs.rs | 6 ++-- std/src/net/tcp.rs | 10 ++---- std/src/os/android/fs.rs | 6 ++-- std/src/os/android/raw.rs | 10 +++--- std/src/os/dragonfly/fs.rs | 6 ++-- std/src/os/dragonfly/raw.rs | 10 +++--- std/src/os/emscripten/fs.rs | 6 ++-- std/src/os/emscripten/raw.rs | 10 +++--- std/src/os/espidf/fs.rs | 6 ++-- std/src/os/espidf/raw.rs | 10 +++--- std/src/os/freebsd/fs.rs | 6 ++-- std/src/os/freebsd/raw.rs | 10 +++--- std/src/os/fuchsia/raw.rs | 10 +++--- std/src/os/haiku/fs.rs | 6 ++-- std/src/os/haiku/raw.rs | 10 +++--- std/src/os/illumos/fs.rs | 4 +-- std/src/os/illumos/raw.rs | 4 +-- std/src/os/ios/fs.rs | 6 ++-- std/src/os/ios/raw.rs | 10 +++--- std/src/os/l4re/fs.rs | 2 +- std/src/os/l4re/raw.rs | 10 +++--- std/src/os/linux/fs.rs | 2 +- std/src/os/linux/raw.rs | 10 +++--- std/src/os/macos/fs.rs | 6 ++-- std/src/os/macos/raw.rs | 10 +++--- std/src/os/netbsd/fs.rs | 6 ++-- std/src/os/netbsd/raw.rs | 10 +++--- std/src/os/openbsd/fs.rs | 6 ++-- std/src/os/openbsd/raw.rs | 10 +++--- std/src/os/redox/fs.rs | 6 ++-- std/src/os/redox/raw.rs | 10 +++--- std/src/os/solaris/fs.rs | 6 ++-- std/src/os/solaris/raw.rs | 10 +++--- std/src/os/unix/process.rs | 2 +- std/src/os/unix/raw.rs | 10 +++--- std/src/sync/condvar.rs | 2 +- std/src/sync/once.rs | 4 +-- std/src/thread/mod.rs | 4 +-- 73 files changed, 267 insertions(+), 347 deletions(-) diff --git a/alloc/src/slice.rs b/alloc/src/slice.rs index 31edbe0c5..68785c791 100644 --- a/alloc/src/slice.rs +++ b/alloc/src/slice.rs @@ -657,7 +657,7 @@ impl [T] { /// ``` #[rustc_allow_incoherent_impl] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.3.0", reason = "renamed to join")] + #[deprecated(since = "1.3.0", note = "renamed to join")] pub fn connect(&self, sep: Separator) -> >::Output where Self: Join, diff --git a/core/src/alloc/layout.rs b/core/src/alloc/layout.rs index 6ec178b7b..cf864039a 100644 --- a/core/src/alloc/layout.rs +++ b/core/src/alloc/layout.rs @@ -419,9 +419,9 @@ impl Layout { } #[stable(feature = "alloc_layout", since = "1.28.0")] -#[rustc_deprecated( +#[deprecated( since = "1.52.0", - reason = "Name does not follow std convention, use LayoutError", + note = "Name does not follow std convention, use LayoutError", suggestion = "LayoutError" )] pub type LayoutErr = LayoutError; diff --git a/core/src/alloc/mod.rs b/core/src/alloc/mod.rs index 242725b96..a034562d1 100644 --- a/core/src/alloc/mod.rs +++ b/core/src/alloc/mod.rs @@ -10,9 +10,9 @@ pub use self::global::GlobalAlloc; #[stable(feature = "alloc_layout", since = "1.28.0")] pub use self::layout::Layout; #[stable(feature = "alloc_layout", since = "1.28.0")] -#[rustc_deprecated( +#[deprecated( since = "1.52.0", - reason = "Name does not follow std convention, use LayoutError", + note = "Name does not follow std convention, use LayoutError", suggestion = "LayoutError" )] #[allow(deprecated, deprecated_in_future)] diff --git a/core/src/array/iter.rs b/core/src/array/iter.rs index e5024c215..5cecc4086 100644 --- a/core/src/array/iter.rs +++ b/core/src/array/iter.rs @@ -79,7 +79,7 @@ impl IntoIterator for [T; N] { impl IntoIter { /// Creates a new iterator over the given `array`. #[stable(feature = "array_value_iter", since = "1.51.0")] - #[rustc_deprecated(since = "1.59.0", reason = "use `IntoIterator::into_iter` instead")] + #[deprecated(since = "1.59.0", note = "use `IntoIterator::into_iter` instead")] pub fn new(array: [T; N]) -> Self { IntoIterator::into_iter(array) } diff --git a/core/src/fmt/mod.rs b/core/src/fmt/mod.rs index fac959ac7..8a3605436 100644 --- a/core/src/fmt/mod.rs +++ b/core/src/fmt/mod.rs @@ -1651,10 +1651,10 @@ impl<'a> Formatter<'a> { /// Flags for formatting #[must_use] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.24.0", - reason = "use the `sign_plus`, `sign_minus`, `alternate`, \ - or `sign_aware_zero_pad` methods instead" + note = "use the `sign_plus`, `sign_minus`, `alternate`, \ + or `sign_aware_zero_pad` methods instead" )] pub fn flags(&self) -> u32 { self.flags diff --git a/core/src/hash/sip.rs b/core/src/hash/sip.rs index b9443e300..d153a296e 100644 --- a/core/src/hash/sip.rs +++ b/core/src/hash/sip.rs @@ -14,10 +14,7 @@ use crate::ptr; /// /// See: #[unstable(feature = "hashmap_internals", issue = "none")] -#[rustc_deprecated( - since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" -)] +#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")] #[derive(Debug, Clone, Default)] #[doc(hidden)] pub struct SipHasher13 { @@ -28,10 +25,7 @@ pub struct SipHasher13 { /// /// See: #[unstable(feature = "hashmap_internals", issue = "none")] -#[rustc_deprecated( - since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" -)] +#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")] #[derive(Debug, Clone, Default)] struct SipHasher24 { hasher: Hasher, @@ -50,10 +44,7 @@ struct SipHasher24 { /// it is not intended for cryptographic purposes. As such, all /// cryptographic uses of this implementation are _strongly discouraged_. #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" -)] +#[deprecated(since = "1.13.0", note = "use `std::collections::hash_map::DefaultHasher` instead")] #[derive(Debug, Clone, Default)] pub struct SipHasher(SipHasher24); @@ -153,9 +144,9 @@ impl SipHasher { /// Creates a new `SipHasher` with the two initial keys set to 0. #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" + note = "use `std::collections::hash_map::DefaultHasher` instead" )] #[must_use] pub fn new() -> SipHasher { @@ -165,9 +156,9 @@ impl SipHasher { /// Creates a `SipHasher` that is keyed off the provided keys. #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" + note = "use `std::collections::hash_map::DefaultHasher` instead" )] #[must_use] pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher { @@ -179,9 +170,9 @@ impl SipHasher13 { /// Creates a new `SipHasher13` with the two initial keys set to 0. #[inline] #[unstable(feature = "hashmap_internals", issue = "none")] - #[rustc_deprecated( + #[deprecated( since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" + note = "use `std::collections::hash_map::DefaultHasher` instead" )] pub fn new() -> SipHasher13 { SipHasher13::new_with_keys(0, 0) @@ -190,9 +181,9 @@ impl SipHasher13 { /// Creates a `SipHasher13` that is keyed off the provided keys. #[inline] #[unstable(feature = "hashmap_internals", issue = "none")] - #[rustc_deprecated( + #[deprecated( since = "1.13.0", - reason = "use `std::collections::hash_map::DefaultHasher` instead" + note = "use `std::collections::hash_map::DefaultHasher` instead" )] pub fn new_with_keys(key0: u64, key1: u64) -> SipHasher13 { SipHasher13 { hasher: Hasher::new_with_keys(key0, key1) } diff --git a/core/src/intrinsics.rs b/core/src/intrinsics.rs index 8e02ca843..ec2412dc3 100644 --- a/core/src/intrinsics.rs +++ b/core/src/intrinsics.rs @@ -63,10 +63,7 @@ use crate::mem; use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering}; #[stable(feature = "drop_in_place", since = "1.8.0")] -#[rustc_deprecated( - reason = "no longer an intrinsic - use `ptr::drop_in_place` directly", - since = "1.52.0" -)] +#[deprecated(note = "no longer an intrinsic - use `ptr::drop_in_place` directly", since = "1.52.0")] #[inline] pub unsafe fn drop_in_place(to_drop: *mut T) { // SAFETY: see `ptr::drop_in_place` diff --git a/core/src/macros/mod.rs b/core/src/macros/mod.rs index 83f33ca00..7b39f8b72 100644 --- a/core/src/macros/mod.rs +++ b/core/src/macros/mod.rs @@ -410,7 +410,7 @@ macro_rules! matches { /// ``` #[macro_export] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "1.39.0", reason = "use the `?` operator instead")] +#[deprecated(since = "1.39.0", note = "use the `?` operator instead")] #[doc(alias = "?")] macro_rules! r#try { ($expr:expr $(,)?) => { @@ -1534,10 +1534,7 @@ pub(crate) mod builtin { #[rustc_builtin_macro] #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(core_intrinsics, libstd_sys_internals)] - #[rustc_deprecated( - since = "1.52.0", - reason = "rustc-serialize is deprecated and no longer supported" - )] + #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")] #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it. pub macro RustcDecodable($item:item) { /* compiler built-in */ @@ -1547,10 +1544,7 @@ pub(crate) mod builtin { #[rustc_builtin_macro] #[stable(feature = "rust1", since = "1.0.0")] #[allow_internal_unstable(core_intrinsics)] - #[rustc_deprecated( - since = "1.52.0", - reason = "rustc-serialize is deprecated and no longer supported" - )] + #[deprecated(since = "1.52.0", note = "rustc-serialize is deprecated and no longer supported")] #[doc(hidden)] // While technically stable, using it is unstable, and deprecated. Hide it. pub macro RustcEncodable($item:item) { /* compiler built-in */ diff --git a/core/src/mem/mod.rs b/core/src/mem/mod.rs index 712d06f21..4ce7c8c2b 100644 --- a/core/src/mem/mod.rs +++ b/core/src/mem/mod.rs @@ -408,7 +408,7 @@ pub const unsafe fn size_of_val_raw(val: *const T) -> usize { #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(reason = "use `align_of` instead", since = "1.2.0")] +#[deprecated(note = "use `align_of` instead", since = "1.2.0")] pub fn min_align_of() -> usize { intrinsics::min_align_of::() } @@ -431,7 +431,7 @@ pub fn min_align_of() -> usize { #[inline] #[must_use] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(reason = "use `align_of_val` instead", since = "1.2.0")] +#[deprecated(note = "use `align_of_val` instead", since = "1.2.0")] pub fn min_align_of_val(val: &T) -> usize { // SAFETY: val is a reference, so it's a valid raw pointer unsafe { intrinsics::min_align_of_val(val) } @@ -673,7 +673,7 @@ pub unsafe fn zeroed() -> T { /// [inv]: MaybeUninit#initialization-invariant #[inline(always)] #[must_use] -#[rustc_deprecated(since = "1.39.0", reason = "use `mem::MaybeUninit` instead")] +#[deprecated(since = "1.39.0", note = "use `mem::MaybeUninit` instead")] #[stable(feature = "rust1", since = "1.0.0")] #[allow(deprecated_in_future)] #[allow(deprecated)] diff --git a/core/src/num/f32.rs b/core/src/num/f32.rs index a983d0872..c355ce3d8 100644 --- a/core/src/num/f32.rs +++ b/core/src/num/f32.rs @@ -31,7 +31,7 @@ use crate::num::FpCategory; /// let r = f32::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `RADIX` associated constant on `f32`")] +#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f32`")] pub const RADIX: u32 = f32::RADIX; /// Number of significant digits in base 2. @@ -48,9 +48,9 @@ pub const RADIX: u32 = f32::RADIX; /// let d = f32::MANTISSA_DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( +#[deprecated( since = "TBD", - reason = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`" + note = "replaced by the `MANTISSA_DIGITS` associated constant on `f32`" )] pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS; @@ -68,7 +68,7 @@ pub const MANTISSA_DIGITS: u32 = f32::MANTISSA_DIGITS; /// let d = f32::DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `DIGITS` associated constant on `f32`")] +#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f32`")] pub const DIGITS: u32 = f32::DIGITS; /// [Machine epsilon] value for `f32`. @@ -89,10 +89,7 @@ pub const DIGITS: u32 = f32::DIGITS; /// let e = f32::EPSILON; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `EPSILON` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f32`")] pub const EPSILON: f32 = f32::EPSILON; /// Smallest finite `f32` value. @@ -109,7 +106,7 @@ pub const EPSILON: f32 = f32::EPSILON; /// let min = f32::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on `f32`")] +#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f32`")] pub const MIN: f32 = f32::MIN; /// Smallest positive normal `f32` value. @@ -126,10 +123,7 @@ pub const MIN: f32 = f32::MIN; /// let min = f32::MIN_POSITIVE; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_POSITIVE` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f32`")] pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE; /// Largest finite `f32` value. @@ -146,7 +140,7 @@ pub const MIN_POSITIVE: f32 = f32::MIN_POSITIVE; /// let max = f32::MAX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on `f32`")] +#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f32`")] pub const MAX: f32 = f32::MAX; /// One greater than the minimum possible normal power of 2 exponent. @@ -163,10 +157,7 @@ pub const MAX: f32 = f32::MAX; /// let min = f32::MIN_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_EXP` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f32`")] pub const MIN_EXP: i32 = f32::MIN_EXP; /// Maximum possible power of 2 exponent. @@ -183,10 +174,7 @@ pub const MIN_EXP: i32 = f32::MIN_EXP; /// let max = f32::MAX_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MAX_EXP` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f32`")] pub const MAX_EXP: i32 = f32::MAX_EXP; /// Minimum possible normal power of 10 exponent. @@ -203,10 +191,7 @@ pub const MAX_EXP: i32 = f32::MAX_EXP; /// let min = f32::MIN_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_10_EXP` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f32`")] pub const MIN_10_EXP: i32 = f32::MIN_10_EXP; /// Maximum possible power of 10 exponent. @@ -223,10 +208,7 @@ pub const MIN_10_EXP: i32 = f32::MIN_10_EXP; /// let max = f32::MAX_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MAX_10_EXP` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f32`")] pub const MAX_10_EXP: i32 = f32::MAX_10_EXP; /// Not a Number (NaN). @@ -243,7 +225,7 @@ pub const MAX_10_EXP: i32 = f32::MAX_10_EXP; /// let nan = f32::NAN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `NAN` associated constant on `f32`")] +#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f32`")] pub const NAN: f32 = f32::NAN; /// Infinity (∞). @@ -260,10 +242,7 @@ pub const NAN: f32 = f32::NAN; /// let inf = f32::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `INFINITY` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f32`")] pub const INFINITY: f32 = f32::INFINITY; /// Negative infinity (−∞). @@ -280,10 +259,7 @@ pub const INFINITY: f32 = f32::INFINITY; /// let ninf = f32::NEG_INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `NEG_INFINITY` associated constant on `f32`" -)] +#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f32`")] pub const NEG_INFINITY: f32 = f32::NEG_INFINITY; /// Basic mathematical constants. diff --git a/core/src/num/f64.rs b/core/src/num/f64.rs index 05598e5fe..8def236f4 100644 --- a/core/src/num/f64.rs +++ b/core/src/num/f64.rs @@ -31,7 +31,7 @@ use crate::num::FpCategory; /// let r = f64::RADIX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `RADIX` associated constant on `f64`")] +#[deprecated(since = "TBD", note = "replaced by the `RADIX` associated constant on `f64`")] pub const RADIX: u32 = f64::RADIX; /// Number of significant digits in base 2. @@ -48,9 +48,9 @@ pub const RADIX: u32 = f64::RADIX; /// let d = f64::MANTISSA_DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( +#[deprecated( since = "TBD", - reason = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`" + note = "replaced by the `MANTISSA_DIGITS` associated constant on `f64`" )] pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS; @@ -68,7 +68,7 @@ pub const MANTISSA_DIGITS: u32 = f64::MANTISSA_DIGITS; /// let d = f64::DIGITS; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `DIGITS` associated constant on `f64`")] +#[deprecated(since = "TBD", note = "replaced by the `DIGITS` associated constant on `f64`")] pub const DIGITS: u32 = f64::DIGITS; /// [Machine epsilon] value for `f64`. @@ -89,10 +89,7 @@ pub const DIGITS: u32 = f64::DIGITS; /// let e = f64::EPSILON; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `EPSILON` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `EPSILON` associated constant on `f64`")] pub const EPSILON: f64 = f64::EPSILON; /// Smallest finite `f64` value. @@ -109,7 +106,7 @@ pub const EPSILON: f64 = f64::EPSILON; /// let min = f64::MIN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on `f64`")] +#[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on `f64`")] pub const MIN: f64 = f64::MIN; /// Smallest positive normal `f64` value. @@ -126,10 +123,7 @@ pub const MIN: f64 = f64::MIN; /// let min = f64::MIN_POSITIVE; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_POSITIVE` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_POSITIVE` associated constant on `f64`")] pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE; /// Largest finite `f64` value. @@ -146,7 +140,7 @@ pub const MIN_POSITIVE: f64 = f64::MIN_POSITIVE; /// let max = f64::MAX; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on `f64`")] +#[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on `f64`")] pub const MAX: f64 = f64::MAX; /// One greater than the minimum possible normal power of 2 exponent. @@ -163,10 +157,7 @@ pub const MAX: f64 = f64::MAX; /// let min = f64::MIN_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_EXP` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_EXP` associated constant on `f64`")] pub const MIN_EXP: i32 = f64::MIN_EXP; /// Maximum possible power of 2 exponent. @@ -183,10 +174,7 @@ pub const MIN_EXP: i32 = f64::MIN_EXP; /// let max = f64::MAX_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MAX_EXP` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MAX_EXP` associated constant on `f64`")] pub const MAX_EXP: i32 = f64::MAX_EXP; /// Minimum possible normal power of 10 exponent. @@ -203,10 +191,7 @@ pub const MAX_EXP: i32 = f64::MAX_EXP; /// let min = f64::MIN_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MIN_10_EXP` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MIN_10_EXP` associated constant on `f64`")] pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; /// Maximum possible power of 10 exponent. @@ -223,10 +208,7 @@ pub const MIN_10_EXP: i32 = f64::MIN_10_EXP; /// let max = f64::MAX_10_EXP; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `MAX_10_EXP` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `MAX_10_EXP` associated constant on `f64`")] pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; /// Not a Number (NaN). @@ -243,7 +225,7 @@ pub const MAX_10_EXP: i32 = f64::MAX_10_EXP; /// let nan = f64::NAN; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "TBD", reason = "replaced by the `NAN` associated constant on `f64`")] +#[deprecated(since = "TBD", note = "replaced by the `NAN` associated constant on `f64`")] pub const NAN: f64 = f64::NAN; /// Infinity (∞). @@ -260,10 +242,7 @@ pub const NAN: f64 = f64::NAN; /// let inf = f64::INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `INFINITY` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `INFINITY` associated constant on `f64`")] pub const INFINITY: f64 = f64::INFINITY; /// Negative infinity (−∞). @@ -280,10 +259,7 @@ pub const INFINITY: f64 = f64::INFINITY; /// let ninf = f64::NEG_INFINITY; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( - since = "TBD", - reason = "replaced by the `NEG_INFINITY` associated constant on `f64`" -)] +#[deprecated(since = "TBD", note = "replaced by the `NEG_INFINITY` associated constant on `f64`")] pub const NEG_INFINITY: f64 = f64::NEG_INFINITY; /// Basic mathematical constants. @@ -600,7 +576,7 @@ impl f64 { #[must_use] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_positive")] + #[deprecated(since = "1.0.0", note = "renamed to is_sign_positive")] #[inline] #[doc(hidden)] pub fn is_positive(self) -> bool { @@ -627,7 +603,7 @@ impl f64 { #[must_use] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.0.0", reason = "renamed to is_sign_negative")] + #[deprecated(since = "1.0.0", note = "renamed to is_sign_negative")] #[inline] #[doc(hidden)] pub fn is_negative(self) -> bool { diff --git a/core/src/num/int_macros.rs b/core/src/num/int_macros.rs index ec460286d..e5d416e82 100644 --- a/core/src/num/int_macros.rs +++ b/core/src/num/int_macros.rs @@ -2703,7 +2703,7 @@ macro_rules! int_impl { #[inline(always)] #[rustc_promotable] #[rustc_const_stable(feature = "const_min_value", since = "1.32.0")] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")] pub const fn min_value() -> Self { Self::MIN } @@ -2716,7 +2716,7 @@ macro_rules! int_impl { #[inline(always)] #[rustc_promotable] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")] pub const fn max_value() -> Self { Self::MAX } diff --git a/core/src/num/shells/i128.rs b/core/src/num/shells/i128.rs index b37767cd5..7b048dc52 100644 --- a/core/src/num/shells/i128.rs +++ b/core/src/num/shells/i128.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "i128", since = "1.26.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `i128`" + note = "all constants in this module replaced by associated constants on `i128`" )] int_module! { i128, #[stable(feature = "i128", since="1.26.0")] } diff --git a/core/src/num/shells/i16.rs b/core/src/num/shells/i16.rs index 3137e72ca..5c5812d5c 100644 --- a/core/src/num/shells/i16.rs +++ b/core/src/num/shells/i16.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `i16`" + note = "all constants in this module replaced by associated constants on `i16`" )] int_module! { i16 } diff --git a/core/src/num/shells/i32.rs b/core/src/num/shells/i32.rs index bb70751d8..b283ac644 100644 --- a/core/src/num/shells/i32.rs +++ b/core/src/num/shells/i32.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `i32`" + note = "all constants in this module replaced by associated constants on `i32`" )] int_module! { i32 } diff --git a/core/src/num/shells/i64.rs b/core/src/num/shells/i64.rs index b08201c25..a416fa7e9 100644 --- a/core/src/num/shells/i64.rs +++ b/core/src/num/shells/i64.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `i64`" + note = "all constants in this module replaced by associated constants on `i64`" )] int_module! { i64 } diff --git a/core/src/num/shells/i8.rs b/core/src/num/shells/i8.rs index a7ad9bbbb..02465013a 100644 --- a/core/src/num/shells/i8.rs +++ b/core/src/num/shells/i8.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `i8`" + note = "all constants in this module replaced by associated constants on `i8`" )] int_module! { i8 } diff --git a/core/src/num/shells/int_macros.rs b/core/src/num/shells/int_macros.rs index c6a5595d9..2b1133e11 100644 --- a/core/src/num/shells/int_macros.rs +++ b/core/src/num/shells/int_macros.rs @@ -19,7 +19,7 @@ macro_rules! int_module { /// ``` /// #[$attr] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")] pub const MIN: $T = $T::MIN; #[doc = concat!( @@ -38,7 +38,7 @@ macro_rules! int_module { /// ``` /// #[$attr] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")] pub const MAX: $T = $T::MAX; ) } diff --git a/core/src/num/shells/isize.rs b/core/src/num/shells/isize.rs index d719936c0..1579fbab6 100644 --- a/core/src/num/shells/isize.rs +++ b/core/src/num/shells/isize.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `isize`" + note = "all constants in this module replaced by associated constants on `isize`" )] int_module! { isize } diff --git a/core/src/num/shells/u128.rs b/core/src/num/shells/u128.rs index 49f56c67c..fe08cee58 100644 --- a/core/src/num/shells/u128.rs +++ b/core/src/num/shells/u128.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "i128", since = "1.26.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `u128`" + note = "all constants in this module replaced by associated constants on `u128`" )] int_module! { u128, #[stable(feature = "i128", since="1.26.0")] } diff --git a/core/src/num/shells/u16.rs b/core/src/num/shells/u16.rs index b1d58ad4b..36f8c6978 100644 --- a/core/src/num/shells/u16.rs +++ b/core/src/num/shells/u16.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `u16`" + note = "all constants in this module replaced by associated constants on `u16`" )] int_module! { u16 } diff --git a/core/src/num/shells/u32.rs b/core/src/num/shells/u32.rs index b6acf9500..1c369097d 100644 --- a/core/src/num/shells/u32.rs +++ b/core/src/num/shells/u32.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `u32`" + note = "all constants in this module replaced by associated constants on `u32`" )] int_module! { u32 } diff --git a/core/src/num/shells/u64.rs b/core/src/num/shells/u64.rs index d43726f84..e8b691d15 100644 --- a/core/src/num/shells/u64.rs +++ b/core/src/num/shells/u64.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `u64`" + note = "all constants in this module replaced by associated constants on `u64`" )] int_module! { u64 } diff --git a/core/src/num/shells/u8.rs b/core/src/num/shells/u8.rs index 0eadf85ec..817c6a18a 100644 --- a/core/src/num/shells/u8.rs +++ b/core/src/num/shells/u8.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `u8`" + note = "all constants in this module replaced by associated constants on `u8`" )] int_module! { u8 } diff --git a/core/src/num/shells/usize.rs b/core/src/num/shells/usize.rs index deeed67d4..3e1bec5ec 100644 --- a/core/src/num/shells/usize.rs +++ b/core/src/num/shells/usize.rs @@ -5,9 +5,9 @@ //! New code should use the associated constants directly on the primitive type. #![stable(feature = "rust1", since = "1.0.0")] -#![rustc_deprecated( +#![deprecated( since = "TBD", - reason = "all constants in this module replaced by associated constants on `usize`" + note = "all constants in this module replaced by associated constants on `usize`" )] int_module! { usize } diff --git a/core/src/num/uint_macros.rs b/core/src/num/uint_macros.rs index 514ac69f7..e26f57066 100644 --- a/core/src/num/uint_macros.rs +++ b/core/src/num/uint_macros.rs @@ -2423,7 +2423,7 @@ macro_rules! uint_impl { #[rustc_promotable] #[inline(always)] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MIN` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MIN` associated constant on this type")] pub const fn min_value() -> Self { Self::MIN } /// New code should prefer to use @@ -2434,7 +2434,7 @@ macro_rules! uint_impl { #[rustc_promotable] #[inline(always)] #[rustc_const_stable(feature = "const_max_value", since = "1.32.0")] - #[rustc_deprecated(since = "TBD", reason = "replaced by the `MAX` associated constant on this type")] + #[deprecated(since = "TBD", note = "replaced by the `MAX` associated constant on this type")] pub const fn max_value() -> Self { Self::MAX } } } diff --git a/core/src/str/iter.rs b/core/src/str/iter.rs index e529bccbc..e00c6d377 100644 --- a/core/src/str/iter.rs +++ b/core/src/str/iter.rs @@ -1129,7 +1129,7 @@ impl FusedIterator for Lines<'_> {} /// /// [`lines_any`]: str::lines_any #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "1.4.0", reason = "use lines()/Lines instead now")] +#[deprecated(since = "1.4.0", note = "use lines()/Lines instead now")] #[must_use = "iterators are lazy and do nothing unless consumed"] #[derive(Clone, Debug)] #[allow(deprecated)] diff --git a/core/src/str/mod.rs b/core/src/str/mod.rs index 86e1afa28..ede9a28dc 100644 --- a/core/src/str/mod.rs +++ b/core/src/str/mod.rs @@ -591,7 +591,7 @@ impl str { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked(begin..end)` instead")] + #[deprecated(since = "1.29.0", note = "use `get_unchecked(begin..end)` instead")] #[must_use] #[inline] pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str { @@ -625,7 +625,7 @@ impl str { /// * `begin` and `end` must be byte positions within the string slice. /// * `begin` and `end` must lie on UTF-8 sequence boundaries. #[stable(feature = "str_slice_mut", since = "1.5.0")] - #[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked_mut(begin..end)` instead")] + #[deprecated(since = "1.29.0", note = "use `get_unchecked_mut(begin..end)` instead")] #[inline] pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str { // SAFETY: the caller must uphold the safety contract for `get_unchecked_mut`; @@ -1000,7 +1000,7 @@ impl str { /// An iterator over the lines of a string. #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.4.0", reason = "use lines() instead now")] + #[deprecated(since = "1.4.0", note = "use lines() instead now")] #[inline] #[allow(deprecated)] pub fn lines_any(&self) -> LinesAny<'_> { @@ -1964,11 +1964,7 @@ impl str { without modifying the original"] #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( - since = "1.33.0", - reason = "superseded by `trim_start`", - suggestion = "trim_start" - )] + #[deprecated(since = "1.33.0", note = "superseded by `trim_start`", suggestion = "trim_start")] pub fn trim_left(&self) -> &str { self.trim_start() } @@ -2008,11 +2004,7 @@ impl str { without modifying the original"] #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( - since = "1.33.0", - reason = "superseded by `trim_end`", - suggestion = "trim_end" - )] + #[deprecated(since = "1.33.0", note = "superseded by `trim_end`", suggestion = "trim_end")] pub fn trim_right(&self) -> &str { self.trim_end() } @@ -2240,9 +2232,9 @@ impl str { /// assert_eq!("12foo1bar12".trim_left_matches(x), "foo1bar12"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.33.0", - reason = "superseded by `trim_start_matches`", + note = "superseded by `trim_start_matches`", suggestion = "trim_start_matches" )] pub fn trim_left_matches<'a, P: Pattern<'a>>(&'a self, pat: P) -> &'a str { @@ -2283,9 +2275,9 @@ impl str { /// assert_eq!("1fooX".trim_right_matches(|c| c == '1' || c == 'X'), "1foo"); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.33.0", - reason = "superseded by `trim_end_matches`", + note = "superseded by `trim_end_matches`", suggestion = "trim_end_matches" )] pub fn trim_right_matches<'a, P>(&'a self, pat: P) -> &'a str diff --git a/core/src/sync/atomic.rs b/core/src/sync/atomic.rs index 6285d1c1c..b573b7526 100644 --- a/core/src/sync/atomic.rs +++ b/core/src/sync/atomic.rs @@ -270,9 +270,9 @@ pub enum Ordering { /// An [`AtomicBool`] initialized to `false`. #[cfg(target_has_atomic_load_store = "8")] #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( +#[deprecated( since = "1.34.0", - reason = "the `new` function is now preferred", + note = "the `new` function is now preferred", suggestion = "AtomicBool::new(false)" )] pub const ATOMIC_BOOL_INIT: AtomicBool = AtomicBool::new(false); @@ -550,9 +550,9 @@ impl AtomicBool { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.50.0", - reason = "Use `compare_exchange` or `compare_exchange_weak` instead" + note = "Use `compare_exchange` or `compare_exchange_weak` instead" )] #[cfg(target_has_atomic = "8")] pub fn compare_and_swap(&self, current: bool, new: bool, order: Ordering) -> bool { @@ -1234,9 +1234,9 @@ impl AtomicPtr { /// ``` #[inline] #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.50.0", - reason = "Use `compare_exchange` or `compare_exchange_weak` instead" + note = "Use `compare_exchange` or `compare_exchange_weak` instead" )] #[cfg(target_has_atomic = "ptr")] pub fn compare_and_swap(&self, current: *mut T, new: *mut T, order: Ordering) -> *mut T { @@ -1487,9 +1487,9 @@ macro_rules! atomic_int { /// An atomic integer initialized to `0`. #[$stable_init_const] - #[rustc_deprecated( + #[deprecated( since = "1.34.0", - reason = "the `new` function is now preferred", + note = "the `new` function is now preferred", suggestion = $atomic_new, )] pub const $atomic_init: $atomic_type = $atomic_type::new(0); @@ -1809,9 +1809,9 @@ macro_rules! atomic_int { /// ``` #[inline] #[$stable] - #[rustc_deprecated( + #[deprecated( since = "1.50.0", - reason = "Use `compare_exchange` or `compare_exchange_weak` instead") + note = "Use `compare_exchange` or `compare_exchange_weak` instead") ] #[$cfg_cas] pub fn compare_and_swap(&self, @@ -3008,7 +3008,7 @@ impl fmt::Pointer for AtomicPtr { /// [`hint::spin_loop`]: crate::hint::spin_loop #[inline] #[stable(feature = "spin_loop_hint", since = "1.24.0")] -#[rustc_deprecated(since = "1.51.0", reason = "use hint::spin_loop instead")] +#[deprecated(since = "1.51.0", note = "use hint::spin_loop instead")] pub fn spin_loop_hint() { spin_loop() } diff --git a/std/src/ascii.rs b/std/src/ascii.rs index 035cd9f24..c29f01577 100644 --- a/std/src/ascii.rs +++ b/std/src/ascii.rs @@ -39,7 +39,7 @@ pub use core::ascii::{escape_default, EscapeDefault}; /// /// [combining character]: https://en.wikipedia.org/wiki/Combining_character #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "1.26.0", reason = "use inherent methods instead")] +#[deprecated(since = "1.26.0", note = "use inherent methods instead")] pub trait AsciiExt { /// Container type for copied ASCII characters. #[stable(feature = "rust1", since = "1.0.0")] diff --git a/std/src/collections/mod.rs b/std/src/collections/mod.rs index 0caec8fe0..ae2baba09 100644 --- a/std/src/collections/mod.rs +++ b/std/src/collections/mod.rs @@ -402,7 +402,7 @@ #[stable(feature = "rust1", since = "1.0.0")] // FIXME(#82080) The deprecation here is only theoretical, and does not actually produce a warning. -#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.26.0")] +#[deprecated(note = "moved to `std::ops::Bound`", since = "1.26.0")] #[doc(hidden)] pub use crate::ops::Bound; diff --git a/std/src/env.rs b/std/src/env.rs index f03d298d8..319fc4729 100644 --- a/std/src/env.rs +++ b/std/src/env.rs @@ -577,10 +577,10 @@ impl Error for JoinPathsError { /// None => println!("Impossible to get your home dir!"), /// } /// ``` -#[rustc_deprecated( +#[deprecated( since = "1.29.0", - reason = "This function's behavior is unexpected and probably not what you want. \ - Consider using a crate from crates.io instead." + note = "This function's behavior is unexpected and probably not what you want. \ + Consider using a crate from crates.io instead." )] #[must_use] #[stable(feature = "env", since = "1.0.0")] diff --git a/std/src/error.rs b/std/src/error.rs index 4fb94908c..700bf6b21 100644 --- a/std/src/error.rs +++ b/std/src/error.rs @@ -143,15 +143,15 @@ pub trait Error: Debug + Display { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.42.0", reason = "use the Display impl or to_string()")] + #[deprecated(since = "1.42.0", note = "use the Display impl or to_string()")] fn description(&self) -> &str { "description() is deprecated; use Display" } #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated( + #[deprecated( since = "1.33.0", - reason = "replaced by Error::source, which can support downcasting" + note = "replaced by Error::source, which can support downcasting" )] #[allow(missing_docs)] fn cause(&self) -> Option<&dyn Error> { diff --git a/std/src/f32.rs b/std/src/f32.rs index ac288c599..557c59dfb 100644 --- a/std/src/f32.rs +++ b/std/src/f32.rs @@ -511,15 +511,15 @@ impl f32 { #[must_use = "method returns a new number and does not mutate the original value"] #[stable(feature = "rust1", since = "1.0.0")] #[inline] - #[rustc_deprecated( + #[deprecated( since = "1.10.0", - reason = "you probably meant `(self - other).abs()`: \ - this operation is `(self - other).max(0.0)` \ - except that `abs_sub` also propagates NaNs (also \ - known as `fdimf` in C). If you truly need the positive \ - difference, consider using that expression or the C function \ - `fdimf`, depending on how you wish to handle NaN (please consider \ - filing an issue describing your use-case too)." + note = "you probably meant `(self - other).abs()`: \ + this operation is `(self - other).max(0.0)` \ + except that `abs_sub` also propagates NaNs (also \ + known as `fdimf` in C). If you truly need the positive \ + difference, consider using that expression or the C function \ + `fdimf`, depending on how you wish to handle NaN (please consider \ + filing an issue describing your use-case too)." )] pub fn abs_sub(self, other: f32) -> f32 { unsafe { cmath::fdimf(self, other) } diff --git a/std/src/f64.rs b/std/src/f64.rs index 01279f01b..6f322aea6 100644 --- a/std/src/f64.rs +++ b/std/src/f64.rs @@ -513,15 +513,15 @@ impl f64 { #[must_use = "method returns a new number and does not mutate the original value"] #[stable(feature = "rust1", since = "1.0.0")] #[inline] - #[rustc_deprecated( + #[deprecated( since = "1.10.0", - reason = "you probably meant `(self - other).abs()`: \ - this operation is `(self - other).max(0.0)` \ - except that `abs_sub` also propagates NaNs (also \ - known as `fdim` in C). If you truly need the positive \ - difference, consider using that expression or the C function \ - `fdim`, depending on how you wish to handle NaN (please consider \ - filing an issue describing your use-case too)." + note = "you probably meant `(self - other).abs()`: \ + this operation is `(self - other).max(0.0)` \ + except that `abs_sub` also propagates NaNs (also \ + known as `fdim` in C). If you truly need the positive \ + difference, consider using that expression or the C function \ + `fdim`, depending on how you wish to handle NaN (please consider \ + filing an issue describing your use-case too)." )] pub fn abs_sub(self, other: f64) -> f64 { unsafe { cmath::fdim(self, other) } diff --git a/std/src/fs.rs b/std/src/fs.rs index 433b4d530..495a86606 100644 --- a/std/src/fs.rs +++ b/std/src/fs.rs @@ -1851,10 +1851,10 @@ pub fn hard_link, Q: AsRef>(original: P, link: Q) -> io::Re /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( +#[deprecated( since = "1.1.0", - reason = "replaced with std::os::unix::fs::symlink and \ - std::os::windows::fs::{symlink_file, symlink_dir}" + note = "replaced with std::os::unix::fs::symlink and \ + std::os::windows::fs::{symlink_file, symlink_dir}" )] pub fn soft_link, Q: AsRef>(original: P, link: Q) -> io::Result<()> { fs_imp::symlink(original.as_ref(), link.as_ref()) diff --git a/std/src/net/tcp.rs b/std/src/net/tcp.rs index f5d3c4905..063000356 100644 --- a/std/src/net/tcp.rs +++ b/std/src/net/tcp.rs @@ -915,20 +915,14 @@ impl TcpListener { } #[stable(feature = "net2_mutators", since = "1.9.0")] - #[rustc_deprecated( - since = "1.16.0", - reason = "this option can only be set before the socket is bound" - )] + #[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")] #[allow(missing_docs)] pub fn set_only_v6(&self, only_v6: bool) -> io::Result<()> { self.0.set_only_v6(only_v6) } #[stable(feature = "net2_mutators", since = "1.9.0")] - #[rustc_deprecated( - since = "1.16.0", - reason = "this option can only be set before the socket is bound" - )] + #[deprecated(since = "1.16.0", note = "this option can only be set before the socket is bound")] #[allow(missing_docs)] pub fn only_v6(&self) -> io::Result { self.0.only_v6() diff --git a/std/src/os/android/fs.rs b/std/src/os/android/fs.rs index 6aeef330d..1beb3cf6e 100644 --- a/std/src/os/android/fs.rs +++ b/std/src/os/android/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/android/raw.rs b/std/src/os/android/raw.rs index 2b8ade8a8..a255d0320 100644 --- a/std/src/os/android/raw.rs +++ b/std/src/os/android/raw.rs @@ -1,12 +1,12 @@ //! Android-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/dragonfly/fs.rs b/std/src/os/dragonfly/fs.rs index e4c4e04cd..1424fc4c6 100644 --- a/std/src/os/dragonfly/fs.rs +++ b/std/src/os/dragonfly/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/dragonfly/raw.rs b/std/src/os/dragonfly/raw.rs index 2a2d29043..071bf6199 100644 --- a/std/src/os/dragonfly/raw.rs +++ b/std/src/os/dragonfly/raw.rs @@ -1,12 +1,12 @@ //! Dragonfly-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/emscripten/fs.rs b/std/src/os/emscripten/fs.rs index d4f758a34..d5ec8e03c 100644 --- a/std/src/os/emscripten/fs.rs +++ b/std/src/os/emscripten/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/emscripten/raw.rs b/std/src/os/emscripten/raw.rs index 503645c08..d23011c73 100644 --- a/std/src/os/emscripten/raw.rs +++ b/std/src/os/emscripten/raw.rs @@ -3,12 +3,12 @@ //! except using the musl-specific stat64 structure in liblibc. #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/espidf/fs.rs b/std/src/os/espidf/fs.rs index 93dc2c0ca..88701dafe 100644 --- a/std/src/os/espidf/fs.rs +++ b/std/src/os/espidf/fs.rs @@ -12,10 +12,10 @@ use crate::os::espidf::raw; #[stable(feature = "metadata_ext", since = "1.1.0")] pub trait MetadataExt { #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/espidf/raw.rs b/std/src/os/espidf/raw.rs index fb18ec6f6..7df0e74b2 100644 --- a/std/src/os/espidf/raw.rs +++ b/std/src/os/espidf/raw.rs @@ -1,12 +1,12 @@ //! Raw type definitions for the ESP-IDF framework. #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] use crate::os::raw::c_long; diff --git a/std/src/os/freebsd/fs.rs b/std/src/os/freebsd/fs.rs index 1eda8690d..8db3a950c 100644 --- a/std/src/os/freebsd/fs.rs +++ b/std/src/os/freebsd/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/freebsd/raw.rs b/std/src/os/freebsd/raw.rs index aeae08fc6..ab0bf7923 100644 --- a/std/src/os/freebsd/raw.rs +++ b/std/src/os/freebsd/raw.rs @@ -1,12 +1,12 @@ //! FreeBSD-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/fuchsia/raw.rs b/std/src/os/fuchsia/raw.rs index f94659cd5..060d6e86b 100644 --- a/std/src/os/fuchsia/raw.rs +++ b/std/src/os/fuchsia/raw.rs @@ -1,12 +1,12 @@ //! Fuchsia-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/haiku/fs.rs b/std/src/os/haiku/fs.rs index 28015f625..a23a2af8f 100644 --- a/std/src/os/haiku/fs.rs +++ b/std/src/os/haiku/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/haiku/raw.rs b/std/src/os/haiku/raw.rs index 48117d288..afbb66ccb 100644 --- a/std/src/os/haiku/raw.rs +++ b/std/src/os/haiku/raw.rs @@ -1,12 +1,12 @@ //! Haiku-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.53.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/illumos/fs.rs b/std/src/os/illumos/fs.rs index 021d154ff..63be48b81 100644 --- a/std/src/os/illumos/fs.rs +++ b/std/src/os/illumos/fs.rs @@ -18,9 +18,9 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor methods of this trait" + note = "deprecated in favor of the accessor methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/illumos/raw.rs b/std/src/os/illumos/raw.rs index 88c832ae7..2bea9ebb3 100644 --- a/std/src/os/illumos/raw.rs +++ b/std/src/os/illumos/raw.rs @@ -1,9 +1,9 @@ //! illumos-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by the standard library, the `libc` \ + note = "these type aliases are no longer supported by the standard library, the `libc` \ crate on crates.io should be used instead for the correct definitions" )] #![allow(deprecated)] diff --git a/std/src/os/ios/fs.rs b/std/src/os/ios/fs.rs index 2c5e38a80..4a4637ce0 100644 --- a/std/src/os/ios/fs.rs +++ b/std/src/os/ios/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/ios/raw.rs b/std/src/os/ios/raw.rs index 97b0a96b0..af12aeebe 100644 --- a/std/src/os/ios/raw.rs +++ b/std/src/os/ios/raw.rs @@ -1,12 +1,12 @@ //! iOS-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/l4re/fs.rs b/std/src/os/l4re/fs.rs index b9b691829..6d6a535b1 100644 --- a/std/src/os/l4re/fs.rs +++ b/std/src/os/l4re/fs.rs @@ -38,7 +38,7 @@ pub trait MetadataExt { /// } /// ``` #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated(since = "1.8.0", reason = "other methods of this trait are now preferred")] + #[deprecated(since = "1.8.0", note = "other methods of this trait are now preferred")] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/l4re/raw.rs b/std/src/os/l4re/raw.rs index 5efd6301f..699e8be33 100644 --- a/std/src/os/l4re/raw.rs +++ b/std/src/os/l4re/raw.rs @@ -1,12 +1,12 @@ //! L4Re-specific raw type definitions. #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/linux/fs.rs b/std/src/os/linux/fs.rs index 9d18ccbeb..2e90d8d6b 100644 --- a/std/src/os/linux/fs.rs +++ b/std/src/os/linux/fs.rs @@ -38,7 +38,7 @@ pub trait MetadataExt { /// } /// ``` #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated(since = "1.8.0", reason = "other methods of this trait are now preferred")] + #[deprecated(since = "1.8.0", note = "other methods of this trait are now preferred")] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/linux/raw.rs b/std/src/os/linux/raw.rs index d78049bce..c73791d14 100644 --- a/std/src/os/linux/raw.rs +++ b/std/src/os/linux/raw.rs @@ -1,12 +1,12 @@ //! Linux-specific raw type definitions. #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/macos/fs.rs b/std/src/os/macos/fs.rs index 4152c3529..91915da6a 100644 --- a/std/src/os/macos/fs.rs +++ b/std/src/os/macos/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/macos/raw.rs b/std/src/os/macos/raw.rs index 708261d86..0b21f6ee5 100644 --- a/std/src/os/macos/raw.rs +++ b/std/src/os/macos/raw.rs @@ -1,12 +1,12 @@ //! macOS-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/netbsd/fs.rs b/std/src/os/netbsd/fs.rs index 6b29a40d2..fe0be069e 100644 --- a/std/src/os/netbsd/fs.rs +++ b/std/src/os/netbsd/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/netbsd/raw.rs b/std/src/os/netbsd/raw.rs index 475fcdcc4..18057291f 100644 --- a/std/src/os/netbsd/raw.rs +++ b/std/src/os/netbsd/raw.rs @@ -1,12 +1,12 @@ //! NetBSD-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/openbsd/fs.rs b/std/src/os/openbsd/fs.rs index 3143dc95f..b8d8d31c5 100644 --- a/std/src/os/openbsd/fs.rs +++ b/std/src/os/openbsd/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/openbsd/raw.rs b/std/src/os/openbsd/raw.rs index 8e34e5483..6711fb51b 100644 --- a/std/src/os/openbsd/raw.rs +++ b/std/src/os/openbsd/raw.rs @@ -1,12 +1,12 @@ //! OpenBSD-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/redox/fs.rs b/std/src/os/redox/fs.rs index 0f179c8b8..682ca6a2c 100644 --- a/std/src/os/redox/fs.rs +++ b/std/src/os/redox/fs.rs @@ -34,10 +34,10 @@ pub trait MetadataExt { /// } /// ``` #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/redox/raw.rs b/std/src/os/redox/raw.rs index 9a6b99684..7b1cd8ae8 100644 --- a/std/src/os/redox/raw.rs +++ b/std/src/os/redox/raw.rs @@ -1,12 +1,12 @@ //! Redox-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/solaris/fs.rs b/std/src/os/solaris/fs.rs index 908c5c38a..093143737 100644 --- a/std/src/os/solaris/fs.rs +++ b/std/src/os/solaris/fs.rs @@ -18,10 +18,10 @@ pub trait MetadataExt { /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the /// cross-Unix abstractions contained within the raw stat. #[stable(feature = "metadata_ext", since = "1.1.0")] - #[rustc_deprecated( + #[deprecated( since = "1.8.0", - reason = "deprecated in favor of the accessor \ - methods of this trait" + note = "deprecated in favor of the accessor \ + methods of this trait" )] #[allow(deprecated)] fn as_raw_stat(&self) -> &raw::stat; diff --git a/std/src/os/solaris/raw.rs b/std/src/os/solaris/raw.rs index e78f9992b..63426c969 100644 --- a/std/src/os/solaris/raw.rs +++ b/std/src/os/solaris/raw.rs @@ -1,12 +1,12 @@ //! Solaris-specific raw type definitions #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/os/unix/process.rs b/std/src/os/unix/process.rs index d95bc9b15..9480d7179 100644 --- a/std/src/os/unix/process.rs +++ b/std/src/os/unix/process.rs @@ -103,7 +103,7 @@ pub trait CommandExt: Sealed { /// /// [`pre_exec`]: CommandExt::pre_exec #[stable(feature = "process_exec", since = "1.15.0")] - #[rustc_deprecated(since = "1.37.0", reason = "should be unsafe, use `pre_exec` instead")] + #[deprecated(since = "1.37.0", note = "should be unsafe, use `pre_exec` instead")] fn before_exec(&mut self, f: F) -> &mut process::Command where F: FnMut() -> io::Result<()> + Send + Sync + 'static, diff --git a/std/src/os/unix/raw.rs b/std/src/os/unix/raw.rs index c292955cb..fe761627b 100644 --- a/std/src/os/unix/raw.rs +++ b/std/src/os/unix/raw.rs @@ -1,12 +1,12 @@ //! Unix-specific primitives available on all unix platforms. #![stable(feature = "raw_ext", since = "1.1.0")] -#![rustc_deprecated( +#![deprecated( since = "1.8.0", - reason = "these type aliases are no longer supported by \ - the standard library, the `libc` crate on \ - crates.io should be used instead for the correct \ - definitions" + note = "these type aliases are no longer supported by \ + the standard library, the `libc` crate on \ + crates.io should be used instead for the correct \ + definitions" )] #![allow(deprecated)] diff --git a/std/src/sync/condvar.rs b/std/src/sync/condvar.rs index b41918ec1..7ff2f330f 100644 --- a/std/src/sync/condvar.rs +++ b/std/src/sync/condvar.rs @@ -303,7 +303,7 @@ impl Condvar { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::sync::Condvar::wait_timeout`")] + #[deprecated(since = "1.6.0", note = "replaced by `std::sync::Condvar::wait_timeout`")] pub fn wait_timeout_ms<'a, T>( &self, guard: MutexGuard<'a, T>, diff --git a/std/src/sync/once.rs b/std/src/sync/once.rs index d2dd4c075..a7feea588 100644 --- a/std/src/sync/once.rs +++ b/std/src/sync/once.rs @@ -152,9 +152,9 @@ pub struct OnceState { /// static START: Once = ONCE_INIT; /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated( +#[deprecated( since = "1.38.0", - reason = "the `new` function is now preferred", + note = "the `new` function is now preferred", suggestion = "Once::new()" )] pub const ONCE_INIT: Once = Once::new(); diff --git a/std/src/thread/mod.rs b/std/src/thread/mod.rs index 5309dc47a..803181c90 100644 --- a/std/src/thread/mod.rs +++ b/std/src/thread/mod.rs @@ -786,7 +786,7 @@ pub fn panicking() -> bool { /// thread::sleep_ms(2000); /// ``` #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::sleep`")] +#[deprecated(since = "1.6.0", note = "replaced by `std::thread::sleep`")] pub fn sleep_ms(ms: u32) { sleep(Duration::from_millis(ms as u64)) } @@ -940,7 +940,7 @@ pub fn park() { /// /// See the [park documentation][`park`] for more detail. #[stable(feature = "rust1", since = "1.0.0")] -#[rustc_deprecated(since = "1.6.0", reason = "replaced by `std::thread::park_timeout`")] +#[deprecated(since = "1.6.0", note = "replaced by `std::thread::park_timeout`")] pub fn park_timeout_ms(ms: u32) { park_timeout(Duration::from_millis(ms as u64)) }