mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
32 lines
871 B
Plaintext
32 lines
871 B
Plaintext
error: unnecessary parentheses around `for` iterator expression
|
|
--> $DIR/issue-90807-unused-paren-error.rs:7:14
|
|
|
|
|
LL | for _ in (1..loop { break 2 }) {}
|
|
| ^ ^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/issue-90807-unused-paren-error.rs:4:9
|
|
|
|
|
LL | #![deny(unused_parens)]
|
|
| ^^^^^^^^^^^^^
|
|
help: remove these parentheses
|
|
|
|
|
LL - for _ in (1..loop { break 2 }) {}
|
|
LL + for _ in 1..loop { break 2 } {}
|
|
|
|
|
|
|
error: unnecessary parentheses around `for` iterator expression
|
|
--> $DIR/issue-90807-unused-paren-error.rs:8:14
|
|
|
|
|
LL | for _ in (1..match () { () => 2 }) {}
|
|
| ^ ^
|
|
|
|
|
help: remove these parentheses
|
|
|
|
|
LL - for _ in (1..match () { () => 2 }) {}
|
|
LL + for _ in 1..match () { () => 2 } {}
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|