11error[E0507]: cannot move out of captured variable in an `Fn` closure
22 --> $DIR/dont-suggest-ref-in-closure.rs:40:21
33 |
4+ LL | let x = X(Y);
5+ | - captured outer variable
6+ ...
47LL | let X(_t) = x;
58 | -- ^
69 | | |
@@ -17,6 +20,9 @@ LL | let X(_t) = x;
1720error[E0507]: cannot move out of captured variable in an `Fn` closure
1821 --> $DIR/dont-suggest-ref-in-closure.rs:44:34
1922 |
23+ LL | let e = Either::One(X(Y));
24+ | - captured outer variable
25+ ...
2026LL | if let Either::One(_t) = e { }
2127 | -- ^
2228 | | |
@@ -33,6 +39,9 @@ LL | if let Either::One(_t) = e { }
3339error[E0507]: cannot move out of captured variable in an `Fn` closure
3440 --> $DIR/dont-suggest-ref-in-closure.rs:48:37
3541 |
42+ LL | let e = Either::One(X(Y));
43+ | - captured outer variable
44+ ...
3645LL | while let Either::One(_t) = e { }
3746 | -- ^
3847 | | |
@@ -49,6 +58,9 @@ LL | while let Either::One(_t) = e { }
4958error[E0507]: cannot move out of captured variable in an `Fn` closure
5059 --> $DIR/dont-suggest-ref-in-closure.rs:52:15
5160 |
61+ LL | let e = Either::One(X(Y));
62+ | - captured outer variable
63+ ...
5264LL | match e {
5365 | ^
5466 | |
@@ -67,6 +79,9 @@ LL | Either::One(_t)
6779error[E0507]: cannot move out of captured variable in an `Fn` closure
6880 --> $DIR/dont-suggest-ref-in-closure.rs:59:15
6981 |
82+ LL | let e = Either::One(X(Y));
83+ | - captured outer variable
84+ ...
7085LL | match e {
7186 | ^
7287 | |
@@ -85,6 +100,9 @@ LL | Either::One(_t) => (),
85100error[E0507]: cannot move out of captured variable in an `Fn` closure
86101 --> $DIR/dont-suggest-ref-in-closure.rs:68:25
87102 |
103+ LL | let x = X(Y);
104+ | - captured outer variable
105+ ...
88106LL | let X(mut _t) = x;
89107 | ------ ^
90108 | | |
@@ -101,6 +119,9 @@ LL | let X(mut _t) = x;
101119error[E0507]: cannot move out of captured variable in an `Fn` closure
102120 --> $DIR/dont-suggest-ref-in-closure.rs:72:38
103121 |
122+ LL | let mut em = Either::One(X(Y));
123+ | ------ captured outer variable
124+ ...
104125LL | if let Either::One(mut _t) = em { }
105126 | ------ ^^
106127 | | |
@@ -117,6 +138,9 @@ LL | if let Either::One(mut _t) = em { }
117138error[E0507]: cannot move out of captured variable in an `Fn` closure
118139 --> $DIR/dont-suggest-ref-in-closure.rs:76:41
119140 |
141+ LL | let mut em = Either::One(X(Y));
142+ | ------ captured outer variable
143+ ...
120144LL | while let Either::One(mut _t) = em { }
121145 | ------ ^^
122146 | | |
@@ -133,6 +157,9 @@ LL | while let Either::One(mut _t) = em { }
133157error[E0507]: cannot move out of captured variable in an `Fn` closure
134158 --> $DIR/dont-suggest-ref-in-closure.rs:80:15
135159 |
160+ LL | let mut em = Either::One(X(Y));
161+ | ------ captured outer variable
162+ ...
136163LL | match em {
137164 | ^^
138165 | |
@@ -151,6 +178,9 @@ LL | Either::One(mut _t)
151178error[E0507]: cannot move out of captured variable in an `Fn` closure
152179 --> $DIR/dont-suggest-ref-in-closure.rs:87:15
153180 |
181+ LL | let mut em = Either::One(X(Y));
182+ | ------ captured outer variable
183+ ...
154184LL | match em {
155185 | ^^
156186 | |
@@ -169,6 +199,9 @@ LL | Either::One(mut _t) => (),
169199error[E0507]: cannot move out of captured variable in an `FnMut` closure
170200 --> $DIR/dont-suggest-ref-in-closure.rs:107:21
171201 |
202+ LL | let x = X(Y);
203+ | - captured outer variable
204+ ...
172205LL | let X(_t) = x;
173206 | -- ^
174207 | | |
@@ -185,6 +218,9 @@ LL | let X(_t) = x;
185218error[E0507]: cannot move out of captured variable in an `FnMut` closure
186219 --> $DIR/dont-suggest-ref-in-closure.rs:111:34
187220 |
221+ LL | let e = Either::One(X(Y));
222+ | - captured outer variable
223+ ...
188224LL | if let Either::One(_t) = e { }
189225 | -- ^
190226 | | |
@@ -201,6 +237,9 @@ LL | if let Either::One(_t) = e { }
201237error[E0507]: cannot move out of captured variable in an `FnMut` closure
202238 --> $DIR/dont-suggest-ref-in-closure.rs:115:37
203239 |
240+ LL | let e = Either::One(X(Y));
241+ | - captured outer variable
242+ ...
204243LL | while let Either::One(_t) = e { }
205244 | -- ^
206245 | | |
@@ -217,6 +256,9 @@ LL | while let Either::One(_t) = e { }
217256error[E0507]: cannot move out of captured variable in an `FnMut` closure
218257 --> $DIR/dont-suggest-ref-in-closure.rs:119:15
219258 |
259+ LL | let e = Either::One(X(Y));
260+ | - captured outer variable
261+ ...
220262LL | match e {
221263 | ^
222264 | |
@@ -235,6 +277,9 @@ LL | Either::One(_t)
235277error[E0507]: cannot move out of captured variable in an `FnMut` closure
236278 --> $DIR/dont-suggest-ref-in-closure.rs:126:15
237279 |
280+ LL | let e = Either::One(X(Y));
281+ | - captured outer variable
282+ ...
238283LL | match e {
239284 | ^
240285 | |
@@ -253,6 +298,9 @@ LL | Either::One(_t) => (),
253298error[E0507]: cannot move out of captured variable in an `FnMut` closure
254299 --> $DIR/dont-suggest-ref-in-closure.rs:135:25
255300 |
301+ LL | let x = X(Y);
302+ | - captured outer variable
303+ ...
256304LL | let X(mut _t) = x;
257305 | ------ ^
258306 | | |
@@ -269,6 +317,9 @@ LL | let X(mut _t) = x;
269317error[E0507]: cannot move out of captured variable in an `FnMut` closure
270318 --> $DIR/dont-suggest-ref-in-closure.rs:139:38
271319 |
320+ LL | let mut em = Either::One(X(Y));
321+ | ------ captured outer variable
322+ ...
272323LL | if let Either::One(mut _t) = em { }
273324 | ------ ^^
274325 | | |
@@ -285,6 +336,9 @@ LL | if let Either::One(mut _t) = em { }
285336error[E0507]: cannot move out of captured variable in an `FnMut` closure
286337 --> $DIR/dont-suggest-ref-in-closure.rs:143:41
287338 |
339+ LL | let mut em = Either::One(X(Y));
340+ | ------ captured outer variable
341+ ...
288342LL | while let Either::One(mut _t) = em { }
289343 | ------ ^^
290344 | | |
@@ -301,6 +355,9 @@ LL | while let Either::One(mut _t) = em { }
301355error[E0507]: cannot move out of captured variable in an `FnMut` closure
302356 --> $DIR/dont-suggest-ref-in-closure.rs:147:15
303357 |
358+ LL | let mut em = Either::One(X(Y));
359+ | ------ captured outer variable
360+ ...
304361LL | match em {
305362 | ^^
306363 | |
@@ -319,6 +376,9 @@ LL | Either::One(mut _t)
319376error[E0507]: cannot move out of captured variable in an `FnMut` closure
320377 --> $DIR/dont-suggest-ref-in-closure.rs:154:15
321378 |
379+ LL | let mut em = Either::One(X(Y));
380+ | ------ captured outer variable
381+ ...
322382LL | match em {
323383 | ^^
324384 | |
@@ -337,6 +397,9 @@ LL | Either::One(mut _t) => (),
337397error[E0507]: cannot move out of captured variable in an `FnMut` closure
338398 --> $DIR/dont-suggest-ref-in-closure.rs:162:15
339399 |
400+ LL | let mut em = Either::One(X(Y));
401+ | ------ captured outer variable
402+ ...
340403LL | match em {
341404 | ^^
342405 | |
0 commit comments