1
1
error: this match could be written as a `let` statement
2
- --> tests/ui/match_single_binding.rs:33 :5
2
+ --> tests/ui/match_single_binding.rs:34 :5
3
3
|
4
4
LL | / match (a, b, c) {
5
5
LL | | (x, y, z) => {
19
19
|
20
20
21
21
error: this match could be written as a `let` statement
22
- --> tests/ui/match_single_binding.rs:39 :5
22
+ --> tests/ui/match_single_binding.rs:40 :5
23
23
|
24
24
LL | / match (a, b, c) {
25
25
LL | | (x, y, z) => println!("{} {} {}", x, y, z),
@@ -33,15 +33,15 @@ LL + println!("{} {} {}", x, y, z);
33
33
|
34
34
35
35
error: this match could be replaced by its body itself
36
- --> tests/ui/match_single_binding.rs:56 :5
36
+ --> tests/ui/match_single_binding.rs:57 :5
37
37
|
38
38
LL | / match a {
39
39
LL | | _ => println!("whatever"),
40
40
LL | | }
41
41
| |_____^ help: consider using the match body instead: `println!("whatever");`
42
42
43
43
error: this match could be replaced by its body itself
44
- --> tests/ui/match_single_binding.rs:60 :5
44
+ --> tests/ui/match_single_binding.rs:61 :5
45
45
|
46
46
LL | / match a {
47
47
LL | | _ => {
60
60
|
61
61
62
62
error: this match could be replaced by its body itself
63
- --> tests/ui/match_single_binding.rs:67 :5
63
+ --> tests/ui/match_single_binding.rs:68 :5
64
64
|
65
65
LL | / match a {
66
66
LL | | _ => {
82
82
|
83
83
84
84
error: this match could be written as a `let` statement
85
- --> tests/ui/match_single_binding.rs:77 :5
85
+ --> tests/ui/match_single_binding.rs:78 :5
86
86
|
87
87
LL | / match p {
88
88
LL | | Point { x, y } => println!("Coords: ({}, {})", x, y),
@@ -96,7 +96,7 @@ LL + println!("Coords: ({}, {})", x, y);
96
96
|
97
97
98
98
error: this match could be written as a `let` statement
99
- --> tests/ui/match_single_binding.rs:81 :5
99
+ --> tests/ui/match_single_binding.rs:82 :5
100
100
|
101
101
LL | / match p {
102
102
LL | | Point { x: x1, y: y1 } => println!("Coords: ({}, {})", x1, y1),
@@ -110,7 +110,7 @@ LL + println!("Coords: ({}, {})", x1, y1);
110
110
|
111
111
112
112
error: this match could be written as a `let` statement
113
- --> tests/ui/match_single_binding.rs:86 :5
113
+ --> tests/ui/match_single_binding.rs:87 :5
114
114
|
115
115
LL | / match x {
116
116
LL | | ref r => println!("Got a reference to {}", r),
@@ -124,7 +124,7 @@ LL + println!("Got a reference to {}", r);
124
124
|
125
125
126
126
error: this match could be written as a `let` statement
127
- --> tests/ui/match_single_binding.rs:91 :5
127
+ --> tests/ui/match_single_binding.rs:92 :5
128
128
|
129
129
LL | / match x {
130
130
LL | | ref mut mr => println!("Got a mutable reference to {}", mr),
@@ -138,7 +138,7 @@ LL + println!("Got a mutable reference to {}", mr);
138
138
|
139
139
140
140
error: this match could be written as a `let` statement
141
- --> tests/ui/match_single_binding.rs:95 :5
141
+ --> tests/ui/match_single_binding.rs:96 :5
142
142
|
143
143
LL | / let product = match coords() {
144
144
LL | | Point { x, y } => x * y,
@@ -152,7 +152,7 @@ LL + let product = x * y;
152
152
|
153
153
154
154
error: this match could be written as a `let` statement
155
- --> tests/ui/match_single_binding.rs:103 :18
155
+ --> tests/ui/match_single_binding.rs:104 :18
156
156
|
157
157
LL | .map(|i| match i.unwrap() {
158
158
| __________________^
@@ -169,7 +169,7 @@ LL ~ })
169
169
|
170
170
171
171
error: this match could be replaced by its body itself
172
- --> tests/ui/match_single_binding.rs:129 :5
172
+ --> tests/ui/match_single_binding.rs:130 :5
173
173
|
174
174
LL | / match x {
175
175
LL | | // =>
@@ -178,7 +178,7 @@ LL | | }
178
178
| |_____^ help: consider using the match body instead: `println!("Not an array index start")`
179
179
180
180
error: this assignment could be simplified
181
- --> tests/ui/match_single_binding.rs:138 :5
181
+ --> tests/ui/match_single_binding.rs:139 :5
182
182
|
183
183
LL | / val = match val.split_at(idx) {
184
184
LL | | (pre, suf) => {
@@ -198,7 +198,7 @@ LL ~ };
198
198
|
199
199
200
200
error: this match could be replaced by its scrutinee and body
201
- --> tests/ui/match_single_binding.rs:151 :16
201
+ --> tests/ui/match_single_binding.rs:152 :16
202
202
|
203
203
LL | let _ = || match side_effects() {
204
204
| ________________^
@@ -215,7 +215,7 @@ LL ~ };
215
215
|
216
216
217
217
error: this match could be written as a `let` statement
218
- --> tests/ui/match_single_binding.rs:157 :5
218
+ --> tests/ui/match_single_binding.rs:158 :5
219
219
|
220
220
LL | / match r {
221
221
LL | | x => match x {
@@ -240,15 +240,15 @@ LL ~ };
240
240
|
241
241
242
242
error: this match could be replaced by its body itself
243
- --> tests/ui/match_single_binding.rs:170 :5
243
+ --> tests/ui/match_single_binding.rs:171 :5
244
244
|
245
245
LL | / match 1 {
246
246
LL | | _ => (),
247
247
LL | | }
248
248
| |_____^ help: consider using the match body instead: `();`
249
249
250
250
error: this match could be replaced by its body itself
251
- --> tests/ui/match_single_binding.rs:174 :13
251
+ --> tests/ui/match_single_binding.rs:175 :13
252
252
|
253
253
LL | let a = match 1 {
254
254
| _____________^
@@ -257,15 +257,15 @@ LL | | };
257
257
| |_____^ help: consider using the match body instead: `()`
258
258
259
259
error: this match could be replaced by its body itself
260
- --> tests/ui/match_single_binding.rs:178 :5
260
+ --> tests/ui/match_single_binding.rs:179 :5
261
261
|
262
262
LL | / match 1 {
263
263
LL | | _ => side_effects(),
264
264
LL | | }
265
265
| |_____^ help: consider using the match body instead: `side_effects();`
266
266
267
267
error: this match could be replaced by its body itself
268
- --> tests/ui/match_single_binding.rs:182 :13
268
+ --> tests/ui/match_single_binding.rs:183 :13
269
269
|
270
270
LL | let b = match 1 {
271
271
| _____________^
@@ -274,15 +274,15 @@ LL | | };
274
274
| |_____^ help: consider using the match body instead: `side_effects()`
275
275
276
276
error: this match could be replaced by its body itself
277
- --> tests/ui/match_single_binding.rs:186 :5
277
+ --> tests/ui/match_single_binding.rs:187 :5
278
278
|
279
279
LL | / match 1 {
280
280
LL | | _ => println!("1"),
281
281
LL | | }
282
282
| |_____^ help: consider using the match body instead: `println!("1");`
283
283
284
284
error: this match could be replaced by its body itself
285
- --> tests/ui/match_single_binding.rs:190 :13
285
+ --> tests/ui/match_single_binding.rs:191 :13
286
286
|
287
287
LL | let c = match 1 {
288
288
| _____________^
@@ -291,23 +291,23 @@ LL | | };
291
291
| |_____^ help: consider using the match body instead: `println!("1")`
292
292
293
293
error: this match could be replaced by its body itself
294
- --> tests/ui/match_single_binding.rs:195 :9
294
+ --> tests/ui/match_single_binding.rs:196 :9
295
295
|
296
296
LL | / match 1 {
297
297
LL | | _ => (),
298
298
LL | | },
299
299
| |_________^ help: consider using the match body instead: `()`
300
300
301
301
error: this match could be replaced by its body itself
302
- --> tests/ui/match_single_binding.rs:198 :9
302
+ --> tests/ui/match_single_binding.rs:199 :9
303
303
|
304
304
LL | / match 1 {
305
305
LL | | _ => side_effects(),
306
306
LL | | },
307
307
| |_________^ help: consider using the match body instead: `side_effects()`
308
308
309
309
error: this match could be replaced by its body itself
310
- --> tests/ui/match_single_binding.rs:201 :9
310
+ --> tests/ui/match_single_binding.rs:202 :9
311
311
|
312
312
LL | / match 1 {
313
313
LL | | _ => println!("1"),
0 commit comments