about summary refs log tree commit diff
path: root/src/test/rustdoc
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 /src/test/rustdoc
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 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/deprecated-future-staged-api.rs18
-rw-r--r--src/test/rustdoc/inline_cross/auxiliary/macros.rs5
-rw-r--r--src/test/rustdoc/inline_cross/macros.rs3
-rw-r--r--src/test/rustdoc/issue-32374.rs4
-rw-r--r--src/test/rustdoc/rustc_deprecated-future.rs19
5 files changed, 23 insertions, 26 deletions
diff --git a/src/test/rustdoc/deprecated-future-staged-api.rs b/src/test/rustdoc/deprecated-future-staged-api.rs
new file mode 100644
index 00000000000..2670e7f5d04
--- /dev/null
+++ b/src/test/rustdoc/deprecated-future-staged-api.rs
@@ -0,0 +1,18 @@
+#![feature(staged_api)]
+#![stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+
+// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
+//      'Deprecation planned'
+// @has deprecated_future_staged_api/struct.S1.html '//*[@class="stab deprecated"]' \
+//      'Deprecating in 99.99.99: effectively never'
+#[deprecated(since = "99.99.99", note = "effectively never")]
+#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+pub struct S1;
+
+// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
+//      'Deprecation planned'
+// @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \
+//      'Deprecating in a future Rust version: literally never'
+#[deprecated(since = "TBD", note = "literally never")]
+#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+pub struct S2;
diff --git a/src/test/rustdoc/inline_cross/auxiliary/macros.rs b/src/test/rustdoc/inline_cross/auxiliary/macros.rs
index 2165be97452..651ae2f1ae8 100644
--- a/src/test/rustdoc/inline_cross/auxiliary/macros.rs
+++ b/src/test/rustdoc/inline_cross/auxiliary/macros.rs
@@ -1,11 +1,10 @@
 #![feature(staged_api)]
-
 #![stable(feature = "rust1", since = "1.0.0")]
 
 /// docs for my_macro
 #[unstable(feature = "macro_test", issue = "none")]
-#[rustc_deprecated(since = "1.2.3", reason = "text")]
+#[deprecated(since = "1.2.3", note = "text")]
 #[macro_export]
 macro_rules! my_macro {
-    () => ()
+    () => {};
 }
diff --git a/src/test/rustdoc/inline_cross/macros.rs b/src/test/rustdoc/inline_cross/macros.rs
index 9cb933c177b..13b4c3c7f61 100644
--- a/src/test/rustdoc/inline_cross/macros.rs
+++ b/src/test/rustdoc/inline_cross/macros.rs
@@ -2,7 +2,6 @@
 // build-aux-docs
 
 #![feature(macro_test)]
-
 #![crate_name = "foo"]
 
 extern crate macros;
@@ -16,5 +15,5 @@ extern crate macros;
 // @has - '//*[@class="docblock"]' 'docs for my_macro'
 // @has - '//*[@class="stab deprecated"]' 'Deprecated since 1.2.3: text'
 // @has - '//*[@class="stab unstable"]' 'macro_test'
-// @has - '//a/@href' '../src/macros/macros.rs.html#9-11'
+// @has - '//a/@href' '../src/macros/macros.rs.html#8-10'
 pub use macros::my_macro;
diff --git a/src/test/rustdoc/issue-32374.rs b/src/test/rustdoc/issue-32374.rs
index 7654a561527..01f95538196 100644
--- a/src/test/rustdoc/issue-32374.rs
+++ b/src/test/rustdoc/issue-32374.rs
@@ -14,7 +14,7 @@
 // @matches issue_32374/struct.T.html '//*[@class="stab unstable"]' \
 //      '🔬 This is a nightly-only experimental API. \(test\s#32374\)$'
 /// Docs
-#[rustc_deprecated(since = "1.0.0", reason = "text")]
+#[deprecated(since = "1.0.0", note = "text")]
 #[unstable(feature = "test", issue = "32374")]
 pub struct T;
 
@@ -22,6 +22,6 @@ pub struct T;
 //      '👎 Deprecated since 1.0.0: deprecated'
 // @has issue_32374/struct.U.html '//*[@class="stab unstable"]' \
 //      '🔬 This is a nightly-only experimental API. (test #32374)'
-#[rustc_deprecated(since = "1.0.0", reason = "deprecated")]
+#[deprecated(since = "1.0.0", note = "deprecated")]
 #[unstable(feature = "test", issue = "32374", reason = "unstable")]
 pub struct U;
diff --git a/src/test/rustdoc/rustc_deprecated-future.rs b/src/test/rustdoc/rustc_deprecated-future.rs
deleted file mode 100644
index 95a767a8329..00000000000
--- a/src/test/rustdoc/rustc_deprecated-future.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-#![feature(staged_api)]
-
-#![stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
-
-// @has rustc_deprecated_future/index.html '//*[@class="stab deprecated"]' \
-//      'Deprecation planned'
-// @has rustc_deprecated_future/struct.S1.html '//*[@class="stab deprecated"]' \
-//      'Deprecating in 99.99.99: effectively never'
-#[rustc_deprecated(since = "99.99.99", reason = "effectively never")]
-#[stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
-pub struct S1;
-
-// @has rustc_deprecated_future/index.html '//*[@class="stab deprecated"]' \
-//      'Deprecation planned'
-// @has rustc_deprecated_future/struct.S2.html '//*[@class="stab deprecated"]' \
-//      'Deprecating in a future Rust version: literally never'
-#[rustc_deprecated(since = "TBD", reason = "literally never")]
-#[stable(feature = "rustc_deprecated-future-test", since = "1.0.0")]
-pub struct S2;