[−][src]Static rustc_lint::builtin::USELESS_DEPRECATED

pub static USELESS_DEPRECATED: &'static Lint

The useless_deprecated lint detects deprecation attributes with no effect.

Example

ⓘThis example deliberately fails to compile
struct X;

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

{{produces}}

Explanation

Deprecation attributes have no effect on trait implementations.