USELESS_DEPRECATED in rustc_lint_defs::builtin - Rust
Description: The `useless_deprecated` lint detects deprecation attributes with no effect.

Skip to main content

## USELESS_DEPRECATED

# Static USELESS_DEPRECATED

Source

    pub static USELESS_DEPRECATED: &Lint

Expand description

The `useless_deprecated` lint detects deprecation attributes with no effect.

#### §Example

ⓘ

    struct X;

    #[deprecated = "message"]
    impl Default for X {
        fn default() -> Self {
            X
        }
    }

{{produces}}

#### §Explanation

Deprecation attributes have no effect on trait implementations.