1
1
error[E0507]: cannot move out of captured variable in an `Fn` closure
2
2
--> $DIR/dont-suggest-ref-in-closure.rs:40:21
3
3
|
4
+ LL | let x = X(Y);
5
+ | - captured outer variable
6
+ ...
4
7
LL | let X(_t) = x;
5
8
| -- ^
6
9
| | |
@@ -17,6 +20,9 @@ LL | let X(_t) = x;
17
20
error[E0507]: cannot move out of captured variable in an `Fn` closure
18
21
--> $DIR/dont-suggest-ref-in-closure.rs:44:34
19
22
|
23
+ LL | let e = Either::One(X(Y));
24
+ | - captured outer variable
25
+ ...
20
26
LL | if let Either::One(_t) = e { }
21
27
| -- ^
22
28
| | |
@@ -33,6 +39,9 @@ LL | if let Either::One(_t) = e { }
33
39
error[E0507]: cannot move out of captured variable in an `Fn` closure
34
40
--> $DIR/dont-suggest-ref-in-closure.rs:48:37
35
41
|
42
+ LL | let e = Either::One(X(Y));
43
+ | - captured outer variable
44
+ ...
36
45
LL | while let Either::One(_t) = e { }
37
46
| -- ^
38
47
| | |
@@ -49,6 +58,9 @@ LL | while let Either::One(_t) = e { }
49
58
error[E0507]: cannot move out of captured variable in an `Fn` closure
50
59
--> $DIR/dont-suggest-ref-in-closure.rs:52:15
51
60
|
61
+ LL | let e = Either::One(X(Y));
62
+ | - captured outer variable
63
+ ...
52
64
LL | match e {
53
65
| ^
54
66
| |
@@ -67,6 +79,9 @@ LL | Either::One(_t)
67
79
error[E0507]: cannot move out of captured variable in an `Fn` closure
68
80
--> $DIR/dont-suggest-ref-in-closure.rs:59:15
69
81
|
82
+ LL | let e = Either::One(X(Y));
83
+ | - captured outer variable
84
+ ...
70
85
LL | match e {
71
86
| ^
72
87
| |
@@ -85,6 +100,9 @@ LL | Either::One(_t) => (),
85
100
error[E0507]: cannot move out of captured variable in an `Fn` closure
86
101
--> $DIR/dont-suggest-ref-in-closure.rs:68:25
87
102
|
103
+ LL | let x = X(Y);
104
+ | - captured outer variable
105
+ ...
88
106
LL | let X(mut _t) = x;
89
107
| ------ ^
90
108
| | |
@@ -101,6 +119,9 @@ LL | let X(mut _t) = x;
101
119
error[E0507]: cannot move out of captured variable in an `Fn` closure
102
120
--> $DIR/dont-suggest-ref-in-closure.rs:72:38
103
121
|
122
+ LL | let mut em = Either::One(X(Y));
123
+ | ------ captured outer variable
124
+ ...
104
125
LL | if let Either::One(mut _t) = em { }
105
126
| ------ ^^
106
127
| | |
@@ -117,6 +138,9 @@ LL | if let Either::One(mut _t) = em { }
117
138
error[E0507]: cannot move out of captured variable in an `Fn` closure
118
139
--> $DIR/dont-suggest-ref-in-closure.rs:76:41
119
140
|
141
+ LL | let mut em = Either::One(X(Y));
142
+ | ------ captured outer variable
143
+ ...
120
144
LL | while let Either::One(mut _t) = em { }
121
145
| ------ ^^
122
146
| | |
@@ -133,6 +157,9 @@ LL | while let Either::One(mut _t) = em { }
133
157
error[E0507]: cannot move out of captured variable in an `Fn` closure
134
158
--> $DIR/dont-suggest-ref-in-closure.rs:80:15
135
159
|
160
+ LL | let mut em = Either::One(X(Y));
161
+ | ------ captured outer variable
162
+ ...
136
163
LL | match em {
137
164
| ^^
138
165
| |
@@ -151,6 +178,9 @@ LL | Either::One(mut _t)
151
178
error[E0507]: cannot move out of captured variable in an `Fn` closure
152
179
--> $DIR/dont-suggest-ref-in-closure.rs:87:15
153
180
|
181
+ LL | let mut em = Either::One(X(Y));
182
+ | ------ captured outer variable
183
+ ...
154
184
LL | match em {
155
185
| ^^
156
186
| |
@@ -169,6 +199,9 @@ LL | Either::One(mut _t) => (),
169
199
error[E0507]: cannot move out of captured variable in an `FnMut` closure
170
200
--> $DIR/dont-suggest-ref-in-closure.rs:107:21
171
201
|
202
+ LL | let x = X(Y);
203
+ | - captured outer variable
204
+ ...
172
205
LL | let X(_t) = x;
173
206
| -- ^
174
207
| | |
@@ -185,6 +218,9 @@ LL | let X(_t) = x;
185
218
error[E0507]: cannot move out of captured variable in an `FnMut` closure
186
219
--> $DIR/dont-suggest-ref-in-closure.rs:111:34
187
220
|
221
+ LL | let e = Either::One(X(Y));
222
+ | - captured outer variable
223
+ ...
188
224
LL | if let Either::One(_t) = e { }
189
225
| -- ^
190
226
| | |
@@ -201,6 +237,9 @@ LL | if let Either::One(_t) = e { }
201
237
error[E0507]: cannot move out of captured variable in an `FnMut` closure
202
238
--> $DIR/dont-suggest-ref-in-closure.rs:115:37
203
239
|
240
+ LL | let e = Either::One(X(Y));
241
+ | - captured outer variable
242
+ ...
204
243
LL | while let Either::One(_t) = e { }
205
244
| -- ^
206
245
| | |
@@ -217,6 +256,9 @@ LL | while let Either::One(_t) = e { }
217
256
error[E0507]: cannot move out of captured variable in an `FnMut` closure
218
257
--> $DIR/dont-suggest-ref-in-closure.rs:119:15
219
258
|
259
+ LL | let e = Either::One(X(Y));
260
+ | - captured outer variable
261
+ ...
220
262
LL | match e {
221
263
| ^
222
264
| |
@@ -235,6 +277,9 @@ LL | Either::One(_t)
235
277
error[E0507]: cannot move out of captured variable in an `FnMut` closure
236
278
--> $DIR/dont-suggest-ref-in-closure.rs:126:15
237
279
|
280
+ LL | let e = Either::One(X(Y));
281
+ | - captured outer variable
282
+ ...
238
283
LL | match e {
239
284
| ^
240
285
| |
@@ -253,6 +298,9 @@ LL | Either::One(_t) => (),
253
298
error[E0507]: cannot move out of captured variable in an `FnMut` closure
254
299
--> $DIR/dont-suggest-ref-in-closure.rs:135:25
255
300
|
301
+ LL | let x = X(Y);
302
+ | - captured outer variable
303
+ ...
256
304
LL | let X(mut _t) = x;
257
305
| ------ ^
258
306
| | |
@@ -269,6 +317,9 @@ LL | let X(mut _t) = x;
269
317
error[E0507]: cannot move out of captured variable in an `FnMut` closure
270
318
--> $DIR/dont-suggest-ref-in-closure.rs:139:38
271
319
|
320
+ LL | let mut em = Either::One(X(Y));
321
+ | ------ captured outer variable
322
+ ...
272
323
LL | if let Either::One(mut _t) = em { }
273
324
| ------ ^^
274
325
| | |
@@ -285,6 +336,9 @@ LL | if let Either::One(mut _t) = em { }
285
336
error[E0507]: cannot move out of captured variable in an `FnMut` closure
286
337
--> $DIR/dont-suggest-ref-in-closure.rs:143:41
287
338
|
339
+ LL | let mut em = Either::One(X(Y));
340
+ | ------ captured outer variable
341
+ ...
288
342
LL | while let Either::One(mut _t) = em { }
289
343
| ------ ^^
290
344
| | |
@@ -301,6 +355,9 @@ LL | while let Either::One(mut _t) = em { }
301
355
error[E0507]: cannot move out of captured variable in an `FnMut` closure
302
356
--> $DIR/dont-suggest-ref-in-closure.rs:147:15
303
357
|
358
+ LL | let mut em = Either::One(X(Y));
359
+ | ------ captured outer variable
360
+ ...
304
361
LL | match em {
305
362
| ^^
306
363
| |
@@ -319,6 +376,9 @@ LL | Either::One(mut _t)
319
376
error[E0507]: cannot move out of captured variable in an `FnMut` closure
320
377
--> $DIR/dont-suggest-ref-in-closure.rs:154:15
321
378
|
379
+ LL | let mut em = Either::One(X(Y));
380
+ | ------ captured outer variable
381
+ ...
322
382
LL | match em {
323
383
| ^^
324
384
| |
@@ -337,6 +397,9 @@ LL | Either::One(mut _t) => (),
337
397
error[E0507]: cannot move out of captured variable in an `FnMut` closure
338
398
--> $DIR/dont-suggest-ref-in-closure.rs:162:15
339
399
|
400
+ LL | let mut em = Either::One(X(Y));
401
+ | ------ captured outer variable
402
+ ...
340
403
LL | match em {
341
404
| ^^
342
405
| |
0 commit comments