]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/issue-103435-extra-parentheses.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / lint / issue-103435-extra-parentheses.rs
1 // run-rustfix
2 #![deny(unused_parens)]
3
4 fn main() {
5     if let(Some(_))= Some(1) {}
6     //~^ ERROR unnecessary parentheses around pattern
7
8     for(_x)in 1..10 {}
9     //~^ ERROR unnecessary parentheses around pattern
10
11     if(2 == 1){}
12     //~^ ERROR unnecessary parentheses around `if` condition
13
14     // reported by parser
15     for(_x in 1..10){}
16     //~^ ERROR expected one of
17     //~| ERROR unexpected parentheses surrounding
18 }