]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/lint-unnecessary-parens.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / lint / lint-unnecessary-parens.stderr
CommitLineData
b7449926 1error: unnecessary parentheses around `return` value
f035d41b 2 --> $DIR/lint-unnecessary-parens.rs:13:12
b7449926 3 |
532ac7d7 4LL | return (1);
c295e0f8 5 | ^ ^
b7449926 6 |
74b04a01 7note: the lint level is defined here
f035d41b 8 --> $DIR/lint-unnecessary-parens.rs:3:9
b7449926
XL
9 |
10LL | #![deny(unused_parens)]
11 | ^^^^^^^^^^^^^
c295e0f8
XL
12help: remove these parentheses
13 |
14LL - return (1);
15LL + return 1;
923072b8 16 |
b7449926
XL
17
18error: unnecessary parentheses around `return` value
f035d41b 19 --> $DIR/lint-unnecessary-parens.rs:16:12
b7449926 20 |
532ac7d7 21LL | return (X { y });
c295e0f8
XL
22 | ^ ^
23 |
24help: remove these parentheses
25 |
26LL - return (X { y });
27LL + return X { y };
923072b8 28 |
b7449926 29
e74abb32 30error: unnecessary parentheses around type
f035d41b 31 --> $DIR/lint-unnecessary-parens.rs:19:46
e74abb32 32 |
f035d41b 33LL | pub fn unused_parens_around_return_type() -> (u32) {
c295e0f8
XL
34 | ^ ^
35 |
36help: remove these parentheses
37 |
38LL - pub fn unused_parens_around_return_type() -> (u32) {
39LL + pub fn unused_parens_around_return_type() -> u32 {
923072b8 40 |
e74abb32 41
dfeec247 42error: unnecessary parentheses around block return value
f035d41b 43 --> $DIR/lint-unnecessary-parens.rs:25:9
dfeec247
XL
44 |
45LL | (5)
c295e0f8
XL
46 | ^ ^
47 |
48help: remove these parentheses
49 |
50LL - (5)
51LL + 5
923072b8 52 |
dfeec247
XL
53
54error: unnecessary parentheses around block return value
f035d41b 55 --> $DIR/lint-unnecessary-parens.rs:27:5
dfeec247
XL
56 |
57LL | (5)
c295e0f8
XL
58 | ^ ^
59 |
60help: remove these parentheses
61 |
62LL - (5)
63LL + 5
923072b8 64 |
dfeec247 65
74b04a01 66error: unnecessary parentheses around assigned value
f035d41b 67 --> $DIR/lint-unnecessary-parens.rs:44:31
74b04a01 68 |
f035d41b 69LL | pub const CONST_ITEM: usize = (10);
c295e0f8
XL
70 | ^ ^
71 |
72help: remove these parentheses
73 |
74LL - pub const CONST_ITEM: usize = (10);
75LL + pub const CONST_ITEM: usize = 10;
923072b8 76 |
74b04a01
XL
77
78error: unnecessary parentheses around assigned value
f035d41b 79 --> $DIR/lint-unnecessary-parens.rs:45:33
74b04a01 80 |
f035d41b 81LL | pub static STATIC_ITEM: usize = (10);
c295e0f8
XL
82 | ^ ^
83 |
84help: remove these parentheses
85 |
86LL - pub static STATIC_ITEM: usize = (10);
87LL + pub static STATIC_ITEM: usize = 10;
923072b8 88 |
74b04a01 89
b7449926 90error: unnecessary parentheses around function argument
f035d41b 91 --> $DIR/lint-unnecessary-parens.rs:49:9
b7449926 92 |
532ac7d7 93LL | bar((true));
c295e0f8
XL
94 | ^ ^
95 |
96help: remove these parentheses
97 |
98LL - bar((true));
99LL + bar(true);
923072b8 100 |
b7449926
XL
101
102error: unnecessary parentheses around `if` condition
f035d41b 103 --> $DIR/lint-unnecessary-parens.rs:51:8
b7449926 104 |
532ac7d7 105LL | if (true) {}
c295e0f8
XL
106 | ^ ^
107 |
108help: remove these parentheses
109 |
110LL - if (true) {}
111LL + if true {}
923072b8 112 |
b7449926
XL
113
114error: unnecessary parentheses around `while` condition
f035d41b 115 --> $DIR/lint-unnecessary-parens.rs:52:11
b7449926 116 |
532ac7d7 117LL | while (true) {}
c295e0f8
XL
118 | ^ ^
119 |
120help: remove these parentheses
121 |
122LL - while (true) {}
123LL + while true {}
923072b8 124 |
b7449926 125
ba9703b0 126error: unnecessary parentheses around `match` scrutinee expression
f035d41b 127 --> $DIR/lint-unnecessary-parens.rs:53:11
b7449926 128 |
532ac7d7 129LL | match (true) {
c295e0f8
XL
130 | ^ ^
131 |
132help: remove these parentheses
133 |
134LL - match (true) {
135LL + match true {
923072b8 136 |
b7449926 137
ba9703b0 138error: unnecessary parentheses around `let` scrutinee expression
f035d41b 139 --> $DIR/lint-unnecessary-parens.rs:56:16
b7449926 140 |
532ac7d7 141LL | if let 1 = (1) {}
c295e0f8
XL
142 | ^ ^
143 |
144help: remove these parentheses
145 |
146LL - if let 1 = (1) {}
147LL + if let 1 = 1 {}
923072b8 148 |
b7449926 149
ba9703b0 150error: unnecessary parentheses around `let` scrutinee expression
f035d41b 151 --> $DIR/lint-unnecessary-parens.rs:57:19
b7449926 152 |
532ac7d7 153LL | while let 1 = (2) {}
c295e0f8
XL
154 | ^ ^
155 |
156help: remove these parentheses
157 |
158LL - while let 1 = (2) {}
159LL + while let 1 = 2 {}
923072b8 160 |
b7449926
XL
161
162error: unnecessary parentheses around method argument
29967ef6 163 --> $DIR/lint-unnecessary-parens.rs:73:24
b7449926 164 |
532ac7d7 165LL | X { y: false }.foo((true));
c295e0f8
XL
166 | ^ ^
167 |
168help: remove these parentheses
169 |
170LL - X { y: false }.foo((true));
171LL + X { y: false }.foo(true);
923072b8 172 |
b7449926
XL
173
174error: unnecessary parentheses around assigned value
29967ef6 175 --> $DIR/lint-unnecessary-parens.rs:75:18
b7449926 176 |
532ac7d7 177LL | let mut _a = (0);
c295e0f8
XL
178 | ^ ^
179 |
180help: remove these parentheses
181 |
182LL - let mut _a = (0);
183LL + let mut _a = 0;
923072b8 184 |
b7449926
XL
185
186error: unnecessary parentheses around assigned value
29967ef6 187 --> $DIR/lint-unnecessary-parens.rs:76:10
b7449926 188 |
532ac7d7 189LL | _a = (0);
c295e0f8
XL
190 | ^ ^
191 |
192help: remove these parentheses
193 |
194LL - _a = (0);
195LL + _a = 0;
923072b8 196 |
b7449926
XL
197
198error: unnecessary parentheses around assigned value
29967ef6 199 --> $DIR/lint-unnecessary-parens.rs:77:11
b7449926 200 |
532ac7d7 201LL | _a += (1);
c295e0f8
XL
202 | ^ ^
203 |
204help: remove these parentheses
205 |
206LL - _a += (1);
207LL + _a += 1;
923072b8 208 |
b7449926 209
f035d41b 210error: aborting due to 17 previous errors
b7449926 211