2022-10-24 16:48:28 +08:00
|
|
|
// run-rustfix
|
|
|
|
#![deny(unused_parens)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
if let(Some(_))= Some(1) {}
|
|
|
|
//~^ ERROR unnecessary parentheses around pattern
|
|
|
|
|
|
|
|
for(_x)in 1..10 {}
|
|
|
|
//~^ ERROR unnecessary parentheses around pattern
|
|
|
|
|
2023-11-06 23:41:49 +00:00
|
|
|
if(2 == 1) {}
|
2022-10-24 16:48:28 +08:00
|
|
|
//~^ ERROR unnecessary parentheses around `if` condition
|
|
|
|
|
2022-10-24 18:24:10 +08:00
|
|
|
// reported by parser
|
2023-11-06 23:41:49 +00:00
|
|
|
for(_x in 1..10) {}
|
|
|
|
//~^ ERROR unexpected parentheses surrounding
|
2022-10-24 16:48:28 +08:00
|
|
|
}
|