Open
Description
Code
trait _Trait {}
#[allow(unknown_or_malformed_diagnostic_attributes)]
#[diagnostic::abcdef]
impl _Trait for () {}
Current output
warning: unknown diagnostic attribute
--> src/lib.rs:3:15
|
3 | #[diagnostic::abcdef]
| ^^^^^^
|
= note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
warning: `playground` (lib) generated 1 warning
Desired output
(no warning)
Rationale and extra context
See bevyengine/bevy#17441 for a case where this comes up, where it can't be worked around by introducing a module (because of #79260) or allowing it globally because the lint triggers in a macro.
Rust Version
rustc 1.86.0-nightly (9a1d156f3 2025-01-19)
binary: rustc
commit-hash: 9a1d156f38c51441ee51e5a068f1d0caf4bb0f27
commit-date: 2025-01-19
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.7
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Category: This is a bug.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Lint: unknown_or_malformed_diagnostic_attributesRelevant to the compiler team, which will review and decide on the PR/issue.