pub static UNKNOWN_OR_MALFORMED_DIAGNOSTIC_ATTRIBUTES: &Lint
Expand description

The unknown_or_malformed_diagnostic_attributes lint detects unrecognized or otherwise malformed diagnostic attributes.

§Example

#![feature(diagnostic_namespace)]
#[diagnostic::does_not_exist]
struct Foo;

{{produces}}

§Explanation

It is usually a mistake to specify a diagnostic attribute that does not exist. Check the spelling, and check the diagnostic attribute listing for the correct name. Also consider if you are using an old version of the compiler, and the attribute is only available in a newer version.