]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lint/issue-103435-extra-parentheses.stderr
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / lint / issue-103435-extra-parentheses.stderr
1 error: expected one of `)`, `,`, `@`, or `|`, found keyword `in`
2   --> $DIR/issue-103435-extra-parentheses.rs:15:12
3    |
4 LL |     for(_x in 1..10){}
5    |            ^^ expected one of `)`, `,`, `@`, or `|`
6
7 error: unexpected parentheses surrounding `for` loop head
8   --> $DIR/issue-103435-extra-parentheses.rs:15:8
9    |
10 LL |     for(_x in 1..10){}
11    |        ^           ^
12    |
13 help: remove parentheses in `for` loop
14    |
15 LL -     for(_x in 1..10){}
16 LL +     for _x in 1..10 {}
17    |
18
19 error: unnecessary parentheses around pattern
20   --> $DIR/issue-103435-extra-parentheses.rs:5:11
21    |
22 LL |     if let(Some(_))= Some(1) {}
23    |           ^       ^
24    |
25 note: the lint level is defined here
26   --> $DIR/issue-103435-extra-parentheses.rs:2:9
27    |
28 LL | #![deny(unused_parens)]
29    |         ^^^^^^^^^^^^^
30 help: remove these parentheses
31    |
32 LL -     if let(Some(_))= Some(1) {}
33 LL +     if let Some(_) = Some(1) {}
34    |
35
36 error: unnecessary parentheses around pattern
37   --> $DIR/issue-103435-extra-parentheses.rs:8:8
38    |
39 LL |     for(_x)in 1..10 {}
40    |        ^  ^
41    |
42 help: remove these parentheses
43    |
44 LL -     for(_x)in 1..10 {}
45 LL +     for _x in 1..10 {}
46    |
47
48 error: unnecessary parentheses around `if` condition
49   --> $DIR/issue-103435-extra-parentheses.rs:11:7
50    |
51 LL |     if(2 == 1){}
52    |       ^      ^
53    |
54 help: remove these parentheses
55    |
56 LL -     if(2 == 1){}
57 LL +     if 2 == 1 {}
58    |
59
60 error: aborting due to 5 previous errors
61