@@ -16,73 +16,79 @@ error: unnecessary parentheses around `return` value
16
16
LL | return (X { y });
17
17
| ^^^^^^^^^ help: remove these parentheses
18
18
19
+ error: unnecessary parentheses around type
20
+ --> $DIR/lint-unnecessary-parens.rs:16:42
21
+ |
22
+ LL | fn unused_parens_around_return_type() -> (u32) {
23
+ | ^^^^^ help: remove these parentheses
24
+
19
25
error: unnecessary parentheses around function argument
20
- --> $DIR/lint-unnecessary-parens.rs:18 :9
26
+ --> $DIR/lint-unnecessary-parens.rs:30 :9
21
27
|
22
28
LL | bar((true));
23
29
| ^^^^^^ help: remove these parentheses
24
30
25
31
error: unnecessary parentheses around `if` condition
26
- --> $DIR/lint-unnecessary-parens.rs:20 :8
32
+ --> $DIR/lint-unnecessary-parens.rs:32 :8
27
33
|
28
34
LL | if (true) {}
29
35
| ^^^^^^ help: remove these parentheses
30
36
31
37
error: unnecessary parentheses around `while` condition
32
- --> $DIR/lint-unnecessary-parens.rs:21 :11
38
+ --> $DIR/lint-unnecessary-parens.rs:33 :11
33
39
|
34
40
LL | while (true) {}
35
41
| ^^^^^^ help: remove these parentheses
36
42
37
43
warning: denote infinite loops with `loop { ... }`
38
- --> $DIR/lint-unnecessary-parens.rs:21 :5
44
+ --> $DIR/lint-unnecessary-parens.rs:33 :5
39
45
|
40
46
LL | while (true) {}
41
47
| ^^^^^^^^^^^^ help: use `loop`
42
48
|
43
49
= note: `#[warn(while_true)]` on by default
44
50
45
51
error: unnecessary parentheses around `match` head expression
46
- --> $DIR/lint-unnecessary-parens.rs:23 :11
52
+ --> $DIR/lint-unnecessary-parens.rs:35 :11
47
53
|
48
54
LL | match (true) {
49
55
| ^^^^^^ help: remove these parentheses
50
56
51
57
error: unnecessary parentheses around `let` head expression
52
- --> $DIR/lint-unnecessary-parens.rs:26 :16
58
+ --> $DIR/lint-unnecessary-parens.rs:38 :16
53
59
|
54
60
LL | if let 1 = (1) {}
55
61
| ^^^ help: remove these parentheses
56
62
57
63
error: unnecessary parentheses around `let` head expression
58
- --> $DIR/lint-unnecessary-parens.rs:27 :19
64
+ --> $DIR/lint-unnecessary-parens.rs:39 :19
59
65
|
60
66
LL | while let 1 = (2) {}
61
67
| ^^^ help: remove these parentheses
62
68
63
69
error: unnecessary parentheses around method argument
64
- --> $DIR/lint-unnecessary-parens.rs:41 :24
70
+ --> $DIR/lint-unnecessary-parens.rs:53 :24
65
71
|
66
72
LL | X { y: false }.foo((true));
67
73
| ^^^^^^ help: remove these parentheses
68
74
69
75
error: unnecessary parentheses around assigned value
70
- --> $DIR/lint-unnecessary-parens.rs:43 :18
76
+ --> $DIR/lint-unnecessary-parens.rs:55 :18
71
77
|
72
78
LL | let mut _a = (0);
73
79
| ^^^ help: remove these parentheses
74
80
75
81
error: unnecessary parentheses around assigned value
76
- --> $DIR/lint-unnecessary-parens.rs:44 :10
82
+ --> $DIR/lint-unnecessary-parens.rs:56 :10
77
83
|
78
84
LL | _a = (0);
79
85
| ^^^ help: remove these parentheses
80
86
81
87
error: unnecessary parentheses around assigned value
82
- --> $DIR/lint-unnecessary-parens.rs:45 :11
88
+ --> $DIR/lint-unnecessary-parens.rs:57 :11
83
89
|
84
90
LL | _a += (1);
85
91
| ^^^ help: remove these parentheses
86
92
87
- error: aborting due to 12 previous errors
93
+ error: aborting due to 13 previous errors
88
94
0 commit comments