rust/tests/ui/lint/issue-103435-extra-parentheses.fixed
2023-01-11 09:32:08 +00:00

19 lines
428 B
Rust

// 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
// reported by parser
for _x in 1..10 {}
//~^ ERROR expected one of
//~| ERROR unexpected parentheses surrounding
}