RS.CLIPPY.NO_EFFECT_UNDERSCORE_BINDING

Binding to `_` prefixed variable with no side-effect

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: no_effect_underscore_binding. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for binding to underscore prefixed variable without side-effects.

Why is this bad?

Unlike dead code, these bindings are actually executed. However, as they have no effect and shouldn't be used further on, all they do is make the code less readable.

Example

let _i_serve_no_purpose = 1;