mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
17 lines
367 B
Rust
17 lines
367 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
|
||
|
|
||
|
// FIXME, auto recover from this one?
|
||
|
// for(_x in 1..10) {}
|
||
|
}
|