Skip to content

Commit 67eabe1

Browse files
Add long error explanation for E0550
1 parent c9edc02 commit 67eabe1

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/libsyntax/error_codes.rs

+19-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,25 @@ fn deprecated_function() {}
144144
```
145145
"##,
146146

147+
E0550: r##"
148+
More than one `deprecated` attribute has been put on an item.
149+
150+
Erroneous code example:
151+
152+
```compile_fail,E0550
153+
#[deprecated(note = "because why not?")]
154+
#[deprecated(note = "right?")] // error!
155+
fn the_banished() {}
156+
```
157+
158+
The `deprecated` attribute can only be present **once** on an item.
159+
160+
```
161+
#[deprecated(note = "because why not, right?")]
162+
fn the_banished() {} // ok!
163+
```
164+
"##,
165+
147166
E0552: r##"
148167
A unrecognized representation attribute was used.
149168
@@ -435,7 +454,6 @@ features in the `-Z allow_features` flag.
435454
// rustc_deprecated attribute must be paired with either stable or unstable
436455
// attribute
437456
E0549,
438-
E0550, // multiple deprecated attributes
439457
E0551, // incorrect meta item
440458
E0553, // multiple rustc_const_unstable attributes
441459
// E0555, // replaced with a generic attribute input check

0 commit comments

Comments
 (0)