mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Rollup merge of #122482 - weiznich:fix/122446, r=compiler-errors
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:
commit
c0fd2db49a
@ -4355,7 +4355,6 @@ declare_lint! {
|
||||
pub UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES,
|
||||
Warn,
|
||||
"unrecognized or malformed diagnostic attribute",
|
||||
@feature_gate = sym::diagnostic_namespace;
|
||||
}
|
||||
|
||||
declare_lint! {
|
||||
|
@ -0,0 +1,7 @@
|
||||
#![deny(unknown_or_malformed_diagnostic_attributes)]
|
||||
|
||||
#[diagnostic::unknown_attribute]
|
||||
//~^ERROR unknown diagnostic attribute
|
||||
struct Foo;
|
||||
|
||||
fn main() {}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user