about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-09-30 13:44:13 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-10-01 14:54:32 +0200
commite541b2ece9951fb00612e4fc14739634725cbf36 (patch)
tree1d4ecd62f01516ba18c05dbd77a0d539016ba074 /src/libsyntax
parent702b45e409495a41afcccbe87a251a692b0cefab (diff)
downloadrust-e541b2ece9951fb00612e4fc14739634725cbf36.tar.gz
rust-e541b2ece9951fb00612e4fc14739634725cbf36.zip
Add E0551 long error explanation
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/error_codes.rs20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libsyntax/error_codes.rs b/src/libsyntax/error_codes.rs
index 8a78daee6e4..b0b898eccd6 100644
--- a/src/libsyntax/error_codes.rs
+++ b/src/libsyntax/error_codes.rs
@@ -163,6 +163,25 @@ fn the_banished() {} // ok!
 ```
 "##,
 
+E0551: r##"
+An invalid meta-item was used inside an attribute.
+
+Erroneous code example:
+
+```compile_fail,E0551
+#[deprecated(note)] // error!
+fn i_am_deprecated() {}
+```
+
+Meta items are the key-value pairs inside of an attribute. To fix this issue,
+you need to give a value to the `note` key. Example:
+
+```
+#[deprecated(note = "because")] // ok!
+fn i_am_deprecated() {}
+```
+"##,
+
 E0552: r##"
 A unrecognized representation attribute was used.
 
@@ -454,7 +473,6 @@ features in the `-Z allow_features` flag.
     // rustc_deprecated attribute must be paired with either stable or unstable
     // attribute
     E0549,
-    E0551, // incorrect meta item
     E0553, // multiple rustc_const_unstable attributes
 //  E0555, // replaced with a generic attribute input check
     E0556, // malformed feature, expected just one word