]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/issue-103435-extra-parentheses.fixed
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / issue-103435-extra-parentheses.fixed
1 // run-rustfix
2 #![deny(unused_parens)]
3
4 fn main() {
5     if let Some(_) = Some(1) {}
6     //~^ ERROR unnecessary parentheses around pattern
7
8     for _x in 1..10 {}
9     //~^ ERROR unnecessary parentheses around pattern
10
11     if 2 == 1 {}
12     //~^ ERROR unnecessary parentheses around `if` condition
13
14     // reported by parser
15     for _x in 1..10 {}
16     //~^ ERROR expected one of
17     //~| ERROR unexpected parentheses surrounding
18 }