about summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-09 04:47:30 +0000
committerbors <bors@rust-lang.org>2022-05-09 04:47:30 +0000
commit8a2fe75d0e6e024aa434e5b9c40adb2567f362b8 (patch)
treeefdc8580272e7994c4de5ab04f16cc3087e73c64 /library/std/src/sync
parentdb5b365fb0e7aa5f59d80236f520f5afc6e39ff4 (diff)
parentdac487ae2bf9f0d51b7462e9d311d67f46048643 (diff)
downloadrust-8a2fe75d0e6e024aa434e5b9c40adb2567f362b8.tar.gz
rust-8a2fe75d0e6e024aa434e5b9c40adb2567f362b8.zip
Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors
Remove `#[rustc_deprecated]`

This removes `#[rustc_deprecated]` and introduces diagnostics to help users to the right direction (that being `#[deprecated]`). All uses of `#[rustc_deprecated]` have been converted. CI is expected to fail initially; this requires #95958, which includes converting `stdarch`.

I plan on following up in a short while (maybe a bootstrap cycle?) removing the diagnostics, as they're only intended to be short-term.
Diffstat (limited to 'library/std/src/sync')
-rw-r--r--library/std/src/sync/condvar.rs2
-rw-r--r--library/std/src/sync/once.rs4
2 files changed, 3 insertions, 3 deletions
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();