about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-09-27 13:36:50 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-09-30 15:52:47 +0200
commit67eabe110be3f958df7063d961716002fd2c3030 (patch)
tree87931fedcc7ea36c12f87c1a2e9e6d7a2ad1c327 /src/libsyntax
parentc9edc02e8320a9e5799d185910ece7d491f524e6 (diff)
downloadrust-67eabe110be3f958df7063d961716002fd2c3030.tar.gz
rust-67eabe110be3f958df7063d961716002fd2c3030.zip
Add long error explanation for E0550
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 9925dd8ada0..8a78daee6e4 100644
--- a/src/libsyntax/error_codes.rs
+++ b/src/libsyntax/error_codes.rs
@@ -144,6 +144,25 @@ fn deprecated_function() {}
 ```
 "##,
 
+E0550: r##"
+More than one `deprecated` attribute has been put on an item.
+
+Erroneous code example:
+
+```compile_fail,E0550
+#[deprecated(note = "because why not?")]
+#[deprecated(note = "right?")] // error!
+fn the_banished() {}
+```
+
+The `deprecated` attribute can only be present **once** on an item.
+
+```
+#[deprecated(note = "because why not, right?")]
+fn the_banished() {} // ok!
+```
+"##,
+
 E0552: r##"
 A unrecognized representation attribute was used.
 
@@ -435,7 +454,6 @@ features in the `-Z allow_features` flag.
     // rustc_deprecated attribute must be paired with either stable or unstable
     // attribute
     E0549,
-    E0550, // multiple deprecated attributes
     E0551, // incorrect meta item
     E0553, // multiple rustc_const_unstable attributes
 //  E0555, // replaced with a generic attribute input check