]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/needless_parens_on_range_literals.txt
Rollup merge of #100462 - zohnannor:master, r=thomcc
[rust.git] / src / tools / clippy / src / docs / needless_parens_on_range_literals.txt
1 ### What it does
2 The lint checks for parenthesis on literals in range statements that are
3 superfluous.
4
5 ### Why is this bad?
6 Having superfluous parenthesis makes the code less readable
7 overhead when reading.
8
9 ### Example
10
11 ```
12 for i in (0)..10 {
13   println!("{i}");
14 }
15 ```
16
17 Use instead:
18
19 ```
20 for i in 0..10 {
21   println!("{i}");
22 }
23 ```