UNUSED_LIFETIMES in rustc_lint_defs::builtin - Rust
Description: The `unused_lifetimes` lint detects lifetime parameters that are never used.

Skip to main content

## UNUSED_LIFETIMES

# Static UNUSED_LIFETIMES

Source

    pub static UNUSED_LIFETIMES: &Lint

Expand description

The `unused_lifetimes` lint detects lifetime parameters that are never used.

#### §Example

ⓘ

    #[deny(unused_lifetimes)]

    pub fn foo<'a>() {}

{{produces}}

#### §Explanation

Unused lifetime parameters may signal a mistake or unfinished code. Consider removing the parameter.