]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/no_effect_underscore_binding.txt
Auto merge of #102529 - colinba:master, r=joshtriplett
[rust.git] / src / tools / clippy / src / docs / no_effect_underscore_binding.txt
1 ### What it does
2 Checks for binding to underscore prefixed variable without side-effects.
3
4 ### Why is this bad?
5 Unlike dead code, these bindings are actually
6 executed. However, as they have no effect and shouldn't be used further on, all they
7 do is make the code less readable.
8
9 ### Known problems
10 Further usage of this variable is not checked, which can lead to false positives if it is
11 used later in the code.
12
13 ### Example
14 ```
15 let _i_serve_no_purpose = 1;
16 ```