about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2022-04-11 20:41:10 -0400
committerJacob Pratt <jacob@jhpratt.dev>2022-04-14 21:19:46 -0400
commitbfdf234fae852113d73fbe894d2583857b10d8d2 (patch)
tree4bdde876b32a1829fb39d727d3f9b0a98124f2b1
parente46f8b23dd2c4ddf3b68feaddad2c4b0b6e1c186 (diff)
downloadrust-bfdf234fae852113d73fbe894d2583857b10d8d2.tar.gz
rust-bfdf234fae852113d73fbe894d2583857b10d8d2.zip
Update error code docs
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0539.md4
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0542.md8
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0543.md10
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0549.md12
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0734.md1
-rw-r--r--compiler/rustc_lint_defs/src/builtin.rs2
6 files changed, 18 insertions, 19 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0539.md b/compiler/rustc_error_codes/src/error_codes/E0539.md
index df2d7d910bb..c53d60a5f47 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0539.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0539.md
@@ -6,7 +6,7 @@ Erroneous code example:
 #![feature(staged_api)]
 #![stable(since = "1.0.0", feature = "test")]
 
-#[rustc_deprecated(reason)] // error!
+#[deprecated(note)] // error!
 #[unstable(feature = "deprecated_fn", issue = "123")]
 fn deprecated() {}
 
@@ -30,7 +30,7 @@ To fix these issues you need to give required key-value pairs.
 #![feature(staged_api)]
 #![stable(since = "1.0.0", feature = "test")]
 
-#[rustc_deprecated(since = "1.39.0", reason = "reason")] // ok!
+#[deprecated(since = "1.39.0", note = "reason")] // ok!
 #[unstable(feature = "deprecated_fn", issue = "123")]
 fn deprecated() {}
 
diff --git a/compiler/rustc_error_codes/src/error_codes/E0542.md b/compiler/rustc_error_codes/src/error_codes/E0542.md
index 7fecfeaa57c..c69e574179b 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0542.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0542.md
@@ -13,8 +13,8 @@ fn _stable_fn() {}
 const fn _stable_const_fn() {}
 
 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
-#[rustc_deprecated(
-    reason = "explanation for deprecation"
+#[deprecated(
+    note = "explanation for deprecation"
 )] // invalid
 fn _deprecated_fn() {}
 ```
@@ -32,9 +32,9 @@ fn _stable_fn() {}
 const fn _stable_const_fn() {}
 
 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
-#[rustc_deprecated(
+#[deprecated(
     since = "1.0.0",
-    reason = "explanation for deprecation"
+    note = "explanation for deprecation"
 )] // ok!
 fn _deprecated_fn() {}
 ```
diff --git a/compiler/rustc_error_codes/src/error_codes/E0543.md b/compiler/rustc_error_codes/src/error_codes/E0543.md
index ba26f92e89f..d0b2e2f7a7d 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0543.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0543.md
@@ -1,4 +1,4 @@
-The `reason` value is missing in a stability attribute.
+The `note` value is missing in a stability attribute.
 
 Erroneous code example:
 
@@ -7,22 +7,22 @@ Erroneous code example:
 #![stable(since = "1.0.0", feature = "test")]
 
 #[stable(since = "0.1.0", feature = "_deprecated_fn")]
-#[rustc_deprecated(
+#[deprecated(
     since = "1.0.0"
 )] // invalid
 fn _deprecated_fn() {}
 ```
 
-To fix this issue, you need to provide the `reason` field. Example:
+To fix this issue, you need to provide the `note` field. Example:
 
 ```
 #![feature(staged_api)]
 #![stable(since = "1.0.0", feature = "test")]
 
 #[stable(since = "0.1.0", feature = "_deprecated_fn")]
-#[rustc_deprecated(
+#[deprecated(
     since = "1.0.0",
-    reason = "explanation for deprecation"
+    note = "explanation for deprecation"
 )] // ok!
 fn _deprecated_fn() {}
 ```
diff --git a/compiler/rustc_error_codes/src/error_codes/E0549.md b/compiler/rustc_error_codes/src/error_codes/E0549.md
index d4b78e7e0d6..70e458a9867 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0549.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0549.md
@@ -1,5 +1,5 @@
-A `rustc_deprecated` attribute wasn't paired with a `stable`/`unstable`
-attribute.
+A `deprecated` attribute wasn't paired with a `stable`/`unstable` attribute with
+`#![feature(staged_api)]` enabled.
 
 Erroneous code example:
 
@@ -7,9 +7,9 @@ Erroneous code example:
 #![feature(staged_api)]
 #![stable(since = "1.0.0", feature = "test")]
 
-#[rustc_deprecated(
+#[deprecated(
     since = "1.0.1",
-    reason = "explanation for deprecation"
+    note = "explanation for deprecation"
 )] // invalid
 fn _deprecated_fn() {}
 ```
@@ -22,9 +22,9 @@ Example:
 #![stable(since = "1.0.0", feature = "test")]
 
 #[stable(since = "1.0.0", feature = "test")]
-#[rustc_deprecated(
+#[deprecated(
     since = "1.0.1",
-    reason = "explanation for deprecation"
+    note = "explanation for deprecation"
 )] // ok!
 fn _deprecated_fn() {}
 ```
diff --git a/compiler/rustc_error_codes/src/error_codes/E0734.md b/compiler/rustc_error_codes/src/error_codes/E0734.md
index 4b8e89a7060..b912061ec42 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0734.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0734.md
@@ -3,7 +3,6 @@ A stability attribute has been used outside of the standard library.
 Erroneous code example:
 
 ```compile_fail,E0734
-#[rustc_deprecated(since = "b", reason = "text")] // invalid
 #[stable(feature = "a", since = "b")] // invalid
 #[unstable(feature = "b", issue = "none")] // invalid
 fn foo(){}
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs
index ae8fd026dbc..60ac36ec69c 100644
--- a/compiler/rustc_lint_defs/src/builtin.rs
+++ b/compiler/rustc_lint_defs/src/builtin.rs
@@ -2206,7 +2206,7 @@ declare_lint! {
     /// and then this lint will ensure that the item is no longer used in the
     /// standard library. See the [stability documentation] for more details.
     ///
-    /// [stability documentation]: https://rustc-dev-guide.rust-lang.org/stability.html#rustc_deprecated
+    /// [stability documentation]: https://rustc-dev-guide.rust-lang.org/stability.html#deprecated
     pub DEPRECATED_IN_FUTURE,
     Allow,
     "detects use of items that will be deprecated in a future version",