1
Fork 0

Remove E0551.

Because it's the same as E0539.

Fixes #51489.
This commit is contained in:
Nicholas Nethercote 2023-10-04 17:20:15 +11:00
parent 81136cb391
commit 0ece171c2f
4 changed files with 9 additions and 16 deletions

View file

@ -846,7 +846,7 @@ pub fn find_deprecation(
),
);
} else {
sess.emit_err(session_diagnostics::IncorrectMetaItem2 {
sess.emit_err(session_diagnostics::IncorrectMetaItem {
span: meta.span,
});
}

View file

@ -165,15 +165,6 @@ pub(crate) struct MissingIssue {
pub span: Span,
}
// FIXME: This diagnostic is identical to `IncorrectMetaItem`, barring the error code. Consider
// changing this to `IncorrectMetaItem`. See #51489.
#[derive(Diagnostic)]
#[diag(attr_incorrect_meta_item, code = "E0551")]
pub(crate) struct IncorrectMetaItem2 {
#[primary_span]
pub span: Span,
}
// FIXME: Why is this the same error code as `InvalidReprHintNoParen` and `InvalidReprHintNoValue`?
// It is more similar to `IncorrectReprFormatGeneric`.
#[derive(Diagnostic)]

View file

@ -1,8 +1,10 @@
#### Note: this error code is no longer emitted by the compiler
An invalid meta-item was used inside an attribute.
Erroneous code example:
```compile_fail,E0551
```compile_fail,E0539
#[deprecated(note)] // error!
fn i_am_deprecated() {}
```