Skip to content

Commit

Permalink
Rollup merge of rust-lang#64918 - GuillaumeGomez:long-err-explanation…
Browse files Browse the repository at this point in the history
…-E0551, r=oli-obk

Add long error explanation for E0551

Part of rust-lang#61137
  • Loading branch information
Centril authored Oct 8, 2019
2 parents 6f211f1 + 62f1fb3 commit 7153c92
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion src/libsyntax/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -473,7 +492,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
E0584, // file for module `..` found at both .. and ..
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/deprecation/deprecation-sanity.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ LL | #[deprecated(since = "a", since = "b", note = "c")]

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0538, E0541, E0550, E0565.
Some errors have detailed explanations: E0538, E0541, E0550, E0551, E0565.
For more information about an error, try `rustc --explain E0538`.

0 comments on commit 7153c92

Please sign in to comment.