]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/issue-90807-unused-paren-error.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / unused / issue-90807-unused-paren-error.stderr
1 error: unnecessary parentheses around `for` iterator expression
2   --> $DIR/issue-90807-unused-paren-error.rs:7:14
3    |
4 LL |     for _ in (1..loop { break 2 }) {}
5    |              ^                   ^
6    |
7 note: the lint level is defined here
8   --> $DIR/issue-90807-unused-paren-error.rs:4:9
9    |
10 LL | #![deny(unused_parens)]
11    |         ^^^^^^^^^^^^^
12 help: remove these parentheses
13    |
14 LL -     for _ in (1..loop { break 2 }) {}
15 LL +     for _ in 1..loop { break 2 } {}
16    |
17
18 error: unnecessary parentheses around `for` iterator expression
19   --> $DIR/issue-90807-unused-paren-error.rs:8:14
20    |
21 LL |     for _ in (1..match () { () => 2 }) {}
22    |              ^                       ^
23    |
24 help: remove these parentheses
25    |
26 LL -     for _ in (1..match () { () => 2 }) {}
27 LL +     for _ in 1..match () { () => 2 } {}
28    |
29
30 error: aborting due to 2 previous errors
31