UNKNOWN_DIAGNOSTIC_ATTRIBUTES in rustc_lint_defs::builtin - Rust
Description: The `unknown_diagnostic_attributes` lint detects unknown diagnostic attributes.

Skip to main content

## UNKNOWN_DIAGNOSTIC_ATTRIBUTES

# Static UNKNOWN_DIAGNOSTIC_ATTRIBUTES

Source

    pub static UNKNOWN_DIAGNOSTIC_ATTRIBUTES: &Lint

Expand description

The `unknown_diagnostic_attributes` lint detects unknown diagnostic attributes.

#### §Example

    #[diagnostic::does_not_exist]
    struct Thing;

{{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. See the reference for the list of diagnostic attributes.