forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#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 rust-lang#122446
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#![deny(unknown_or_malformed_diagnostic_attributes)] | ||
|
||
#[diagnostic::unknown_attribute] | ||
//~^ERROR unknown diagnostic attribute | ||
struct Foo; | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
tests/ui/diagnostic_namespace/deny_malformed_attribute.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|