Ungate the UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES lint

This was missed during stablisation of the `#[diagnostic]` attribute
namespace.

Fixes #122446
This commit is contained in:
Georg Semmler 2024-03-14 10:49:28 +01:00
parent 6f3eb1ce3d
commit 25411113c1
No known key found for this signature in database
GPG Key ID: A87BCEE5205CE489
3 changed files with 21 additions and 1 deletions

View File

@ -4341,7 +4341,6 @@
pub UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
Warn,
"unrecognized or malformed diagnostic attribute",
@feature_gate = sym::diagnostic_namespace;
}
declare_lint! {

View File

@ -0,0 +1,7 @@
#![deny(unknown_or_malformed_diagnostic_attributes)]
#[diagnostic::unknown_attribute]
//~^ERROR unknown diagnostic attribute
struct Foo;
fn main() {}

View File

@ -0,0 +1,14 @@
error: unknown diagnostic attribute
--> $DIR/deny_malformed_attribute.rs:3:15
|
LL | #[diagnostic::unknown_attribute]
| ^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/deny_malformed_attribute.rs:1:9
|
LL | #![deny(unknown_or_malformed_diagnostic_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error