UNUSED_VARIABLES in rustc_lint::builtin - Rust
Description: The `unused_variables` lint detects variables which are not used in any way.

Skip to main content

## UNUSED_VARIABLES

# Static UNUSED_VARIABLES

Source

    pub static UNUSED_VARIABLES: &'static Lint

Expand description

The `unused_variables` lint detects variables which are not used in any way.

#### §Example

    let x = 5;

{{produces}}

#### §Explanation

Unused variables may signal a mistake or unfinished code. To silence the warning for the individual variable, prefix it with an underscore such as `_x`.