about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/ascii.rs2
-rw-r--r--library/std/src/collections/mod.rs2
-rw-r--r--library/std/src/env.rs6
-rw-r--r--library/std/src/error.rs6
-rw-r--r--library/std/src/f32.rs16
-rw-r--r--library/std/src/f64.rs16
-rw-r--r--library/std/src/fs.rs6
-rw-r--r--library/std/src/net/tcp.rs10
-rw-r--r--library/std/src/os/android/fs.rs6
-rw-r--r--library/std/src/os/android/raw.rs10
-rw-r--r--library/std/src/os/dragonfly/fs.rs6
-rw-r--r--library/std/src/os/dragonfly/raw.rs10
-rw-r--r--library/std/src/os/emscripten/fs.rs6
-rw-r--r--library/std/src/os/emscripten/raw.rs10
-rw-r--r--library/std/src/os/espidf/fs.rs6
-rw-r--r--library/std/src/os/espidf/raw.rs10
-rw-r--r--library/std/src/os/freebsd/fs.rs6
-rw-r--r--library/std/src/os/freebsd/raw.rs10
-rw-r--r--library/std/src/os/fuchsia/raw.rs10
-rw-r--r--library/std/src/os/haiku/fs.rs6
-rw-r--r--library/std/src/os/haiku/raw.rs10
-rw-r--r--library/std/src/os/illumos/fs.rs4
-rw-r--r--library/std/src/os/illumos/raw.rs4
-rw-r--r--library/std/src/os/ios/fs.rs6
-rw-r--r--library/std/src/os/ios/raw.rs10
-rw-r--r--library/std/src/os/l4re/fs.rs2
-rw-r--r--library/std/src/os/l4re/raw.rs10
-rw-r--r--library/std/src/os/linux/fs.rs2
-rw-r--r--library/std/src/os/linux/raw.rs10
-rw-r--r--library/std/src/os/macos/fs.rs6
-rw-r--r--library/std/src/os/macos/raw.rs10
-rw-r--r--library/std/src/os/netbsd/fs.rs6
-rw-r--r--library/std/src/os/netbsd/raw.rs10
-rw-r--r--library/std/src/os/openbsd/fs.rs6
-rw-r--r--library/std/src/os/openbsd/raw.rs10
-rw-r--r--library/std/src/os/redox/fs.rs6
-rw-r--r--library/std/src/os/redox/raw.rs10
-rw-r--r--library/std/src/os/solaris/fs.rs6
-rw-r--r--library/std/src/os/solaris/raw.rs10
-rw-r--r--library/std/src/os/unix/process.rs2
-rw-r--r--library/std/src/os/unix/raw.rs10
-rw-r--r--library/std/src/sync/condvar.rs2
-rw-r--r--library/std/src/sync/once.rs4
-rw-r--r--library/std/src/thread/mod.rs4
44 files changed, 157 insertions, 163 deletions
diff --git a/library/std/src/ascii.rs b/library/std/src/ascii.rs
index 035cd9f243b..c29f015777f 100644
--- a/library/std/src/ascii.rs
+++ b/library/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/library/std/src/collections/mod.rs b/library/std/src/collections/mod.rs
index 0caec8fe05a..ae2baba09e6 100644
--- a/library/std/src/collections/mod.rs
+++ b/library/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/library/std/src/env.rs b/library/std/src/env.rs
index e287a93da7b..4027a71a06c 100644
--- a/library/std/src/env.rs
+++ b/library/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/library/std/src/error.rs b/library/std/src/error.rs
index fdeb280d240..361163d1970 100644
--- a/library/std/src/error.rs
+++ b/library/std/src/error.rs
@@ -145,15 +145,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/library/std/src/f32.rs b/library/std/src/f32.rs
index ac288c599f3..557c59dfb5f 100644
--- a/library/std/src/f32.rs
+++ b/library/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/library/std/src/f64.rs b/library/std/src/f64.rs
index 01279f01b05..6f322aea6aa 100644
--- a/library/std/src/f64.rs
+++ b/library/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/library/std/src/fs.rs b/library/std/src/fs.rs
index 369a251696e..431a1efc8d1 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -1851,10 +1851,10 @@ pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(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<P: AsRef<Path>, Q: AsRef<Path>>(original: P, link: Q) -> io::Result<()> {
     fs_imp::symlink(original.as_ref(), link.as_ref())
diff --git a/library/std/src/net/tcp.rs b/library/std/src/net/tcp.rs
index f5d3c4905e0..06300035633 100644
--- a/library/std/src/net/tcp.rs
+++ b/library/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<bool> {
         self.0.only_v6()
diff --git a/library/std/src/os/android/fs.rs b/library/std/src/os/android/fs.rs
index 6aeef330dfa..1beb3cf6e84 100644
--- a/library/std/src/os/android/fs.rs
+++ b/library/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/library/std/src/os/android/raw.rs b/library/std/src/os/android/raw.rs
index 2b8ade8a82e..a255d032086 100644
--- a/library/std/src/os/android/raw.rs
+++ b/library/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/library/std/src/os/dragonfly/fs.rs b/library/std/src/os/dragonfly/fs.rs
index e4c4e04cd30..1424fc4c698 100644
--- a/library/std/src/os/dragonfly/fs.rs
+++ b/library/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/library/std/src/os/dragonfly/raw.rs b/library/std/src/os/dragonfly/raw.rs
index 2a2d2904372..071bf6199aa 100644
--- a/library/std/src/os/dragonfly/raw.rs
+++ b/library/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/library/std/src/os/emscripten/fs.rs b/library/std/src/os/emscripten/fs.rs
index d4f758a3457..d5ec8e03c00 100644
--- a/library/std/src/os/emscripten/fs.rs
+++ b/library/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/library/std/src/os/emscripten/raw.rs b/library/std/src/os/emscripten/raw.rs
index 503645c08ce..d23011c7381 100644
--- a/library/std/src/os/emscripten/raw.rs
+++ b/library/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/library/std/src/os/espidf/fs.rs b/library/std/src/os/espidf/fs.rs
index 93dc2c0cab7..88701dafe20 100644
--- a/library/std/src/os/espidf/fs.rs
+++ b/library/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/library/std/src/os/espidf/raw.rs b/library/std/src/os/espidf/raw.rs
index fb18ec6f6f8..7df0e74b223 100644
--- a/library/std/src/os/espidf/raw.rs
+++ b/library/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/library/std/src/os/freebsd/fs.rs b/library/std/src/os/freebsd/fs.rs
index 1eda8690d5d..8db3a950c40 100644
--- a/library/std/src/os/freebsd/fs.rs
+++ b/library/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/library/std/src/os/freebsd/raw.rs b/library/std/src/os/freebsd/raw.rs
index aeae08fc6aa..ab0bf792319 100644
--- a/library/std/src/os/freebsd/raw.rs
+++ b/library/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/library/std/src/os/fuchsia/raw.rs b/library/std/src/os/fuchsia/raw.rs
index f94659cd5ba..060d6e86b6c 100644
--- a/library/std/src/os/fuchsia/raw.rs
+++ b/library/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/library/std/src/os/haiku/fs.rs b/library/std/src/os/haiku/fs.rs
index 28015f62526..a23a2af8f6e 100644
--- a/library/std/src/os/haiku/fs.rs
+++ b/library/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/library/std/src/os/haiku/raw.rs b/library/std/src/os/haiku/raw.rs
index 48117d288ae..afbb66ccb5e 100644
--- a/library/std/src/os/haiku/raw.rs
+++ b/library/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/library/std/src/os/illumos/fs.rs b/library/std/src/os/illumos/fs.rs
index 021d154ff5a..63be48b8131 100644
--- a/library/std/src/os/illumos/fs.rs
+++ b/library/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/library/std/src/os/illumos/raw.rs b/library/std/src/os/illumos/raw.rs
index 88c832ae7c7..2bea9ebb3c8 100644
--- a/library/std/src/os/illumos/raw.rs
+++ b/library/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/library/std/src/os/ios/fs.rs b/library/std/src/os/ios/fs.rs
index 2c5e38a803d..4a4637ce072 100644
--- a/library/std/src/os/ios/fs.rs
+++ b/library/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/library/std/src/os/ios/raw.rs b/library/std/src/os/ios/raw.rs
index 97b0a96b0f1..af12aeebe5d 100644
--- a/library/std/src/os/ios/raw.rs
+++ b/library/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/library/std/src/os/l4re/fs.rs b/library/std/src/os/l4re/fs.rs
index b9b6918292f..6d6a535b1e8 100644
--- a/library/std/src/os/l4re/fs.rs
+++ b/library/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/library/std/src/os/l4re/raw.rs b/library/std/src/os/l4re/raw.rs
index 5efd6301fc9..699e8be33c8 100644
--- a/library/std/src/os/l4re/raw.rs
+++ b/library/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/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
index 23267c44685..479bbcc17a8 100644
--- a/library/std/src/os/linux/fs.rs
+++ b/library/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/library/std/src/os/linux/raw.rs b/library/std/src/os/linux/raw.rs
index d78049bce24..c73791d1452 100644
--- a/library/std/src/os/linux/raw.rs
+++ b/library/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/library/std/src/os/macos/fs.rs b/library/std/src/os/macos/fs.rs
index 4152c352936..91915da6a43 100644
--- a/library/std/src/os/macos/fs.rs
+++ b/library/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/library/std/src/os/macos/raw.rs b/library/std/src/os/macos/raw.rs
index 708261d86bd..0b21f6ee5e4 100644
--- a/library/std/src/os/macos/raw.rs
+++ b/library/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/library/std/src/os/netbsd/fs.rs b/library/std/src/os/netbsd/fs.rs
index 6b29a40d2b5..fe0be069e5e 100644
--- a/library/std/src/os/netbsd/fs.rs
+++ b/library/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/library/std/src/os/netbsd/raw.rs b/library/std/src/os/netbsd/raw.rs
index 475fcdcc4aa..18057291fee 100644
--- a/library/std/src/os/netbsd/raw.rs
+++ b/library/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/library/std/src/os/openbsd/fs.rs b/library/std/src/os/openbsd/fs.rs
index 3143dc95fdf..b8d8d31c5b8 100644
--- a/library/std/src/os/openbsd/fs.rs
+++ b/library/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/library/std/src/os/openbsd/raw.rs b/library/std/src/os/openbsd/raw.rs
index 8e34e5483b7..6711fb51b17 100644
--- a/library/std/src/os/openbsd/raw.rs
+++ b/library/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/library/std/src/os/redox/fs.rs b/library/std/src/os/redox/fs.rs
index 0f179c8b837..682ca6a2c03 100644
--- a/library/std/src/os/redox/fs.rs
+++ b/library/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/library/std/src/os/redox/raw.rs b/library/std/src/os/redox/raw.rs
index 9a6b99684c5..7b1cd8ae800 100644
--- a/library/std/src/os/redox/raw.rs
+++ b/library/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/library/std/src/os/solaris/fs.rs b/library/std/src/os/solaris/fs.rs
index 908c5c38a84..09314373704 100644
--- a/library/std/src/os/solaris/fs.rs
+++ b/library/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/library/std/src/os/solaris/raw.rs b/library/std/src/os/solaris/raw.rs
index e78f9992bb3..63426c96951 100644
--- a/library/std/src/os/solaris/raw.rs
+++ b/library/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/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs
index 9a6778c0e86..9dca9b4a4a3 100644
--- a/library/std/src/os/unix/process.rs
+++ b/library/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<F>(&mut self, f: F) -> &mut process::Command
     where
         F: FnMut() -> io::Result<()> + Send + Sync + 'static,
diff --git a/library/std/src/os/unix/raw.rs b/library/std/src/os/unix/raw.rs
index c292955cb4e..fe761627bc1 100644
--- a/library/std/src/os/unix/raw.rs
+++ b/library/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/library/std/src/sync/condvar.rs b/library/std/src/sync/condvar.rs
index b41918ec1cf..7ff2f330f8a 100644
--- a/library/std/src/sync/condvar.rs
+++ b/library/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/library/std/src/sync/once.rs b/library/std/src/sync/once.rs
index d2dd4c075d2..a7feea58859 100644
--- a/library/std/src/sync/once.rs
+++ b/library/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/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index b4b1037a3cd..7f9b297e9dc 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -789,7 +789,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))
 }
@@ -943,7 +943,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))
 }