2022-10-24 03:48:28 -05: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
|
|
|
|
|
|
|
|
if 2 == 1 {}
|
|
|
|
//~^ ERROR unnecessary parentheses around `if` condition
|
|
|
|
|
2022-10-24 05:24:10 -05:00
|
|
|
// reported by parser
|
|
|
|
for _x in 1..10 {}
|
|
|
|
//~^ ERROR expected one of
|
|
|
|
//~| ERROR unexpected parentheses surrounding
|
2022-10-24 03:48:28 -05:00
|
|
|
}
|