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
|
|
|
|
|
2023-11-06 17:41:49 -06:00
|
|
|
if(2 == 1) {}
|
2022-10-24 03:48:28 -05:00
|
|
|
//~^ ERROR unnecessary parentheses around `if` condition
|
|
|
|
|
2022-10-24 05:24:10 -05:00
|
|
|
// reported by parser
|
2023-11-06 17:41:49 -06:00
|
|
|
for(_x in 1..10) {}
|
|
|
|
//~^ ERROR unexpected parentheses surrounding
|
2022-10-24 03:48:28 -05:00
|
|
|
}
|