1 error[E0507]: cannot move out of captured variable in an `Fn` closure
2 --> $DIR/move-into-closure.rs:28:21
5 | - captured outer variable
10 | | cannot move out of captured variable in an `Fn` closure
11 | | help: consider borrowing here: `&x`
14 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
15 --> $DIR/move-into-closure.rs:28:15
20 error[E0507]: cannot move out of captured variable in an `Fn` closure
21 --> $DIR/move-into-closure.rs:32:34
23 LL | let e = Either::One(X(Y));
24 | - captured outer variable
26 LL | if let Either::One(_t) = e { }
29 | | cannot move out of captured variable in an `Fn` closure
30 | | help: consider borrowing here: `&e`
33 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
34 --> $DIR/move-into-closure.rs:32:28
36 LL | if let Either::One(_t) = e { }
39 error[E0507]: cannot move out of captured variable in an `Fn` closure
40 --> $DIR/move-into-closure.rs:36:37
42 LL | let e = Either::One(X(Y));
43 | - captured outer variable
45 LL | while let Either::One(_t) = e { }
48 | | cannot move out of captured variable in an `Fn` closure
49 | | help: consider borrowing here: `&e`
52 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
53 --> $DIR/move-into-closure.rs:36:31
55 LL | while let Either::One(_t) = e { }
58 error[E0507]: cannot move out of captured variable in an `Fn` closure
59 --> $DIR/move-into-closure.rs:40:15
61 LL | let e = Either::One(X(Y));
62 | - captured outer variable
67 | cannot move out of captured variable in an `Fn` closure
68 | help: consider borrowing here: `&e`
73 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
74 --> $DIR/move-into-closure.rs:44:25
79 error[E0507]: cannot move out of captured variable in an `Fn` closure
80 --> $DIR/move-into-closure.rs:47:15
82 LL | let e = Either::One(X(Y));
83 | - captured outer variable
88 | cannot move out of captured variable in an `Fn` closure
89 | help: consider borrowing here: `&e`
91 LL | Either::One(_t) => (),
94 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
95 --> $DIR/move-into-closure.rs:51:25
97 LL | Either::One(_t) => (),
100 error[E0507]: cannot move out of captured variable in an `Fn` closure
101 --> $DIR/move-into-closure.rs:56:25
104 | - captured outer variable
106 LL | let X(mut _t) = x;
109 | | cannot move out of captured variable in an `Fn` closure
110 | | help: consider borrowing here: `&x`
113 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
114 --> $DIR/move-into-closure.rs:56:15
116 LL | let X(mut _t) = x;
119 error[E0507]: cannot move out of captured variable in an `Fn` closure
120 --> $DIR/move-into-closure.rs:60:38
122 LL | let mut em = Either::One(X(Y));
123 | ------ captured outer variable
125 LL | if let Either::One(mut _t) = em { }
128 | | cannot move out of captured variable in an `Fn` closure
129 | | help: consider borrowing here: `&em`
132 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
133 --> $DIR/move-into-closure.rs:60:28
135 LL | if let Either::One(mut _t) = em { }
138 error[E0507]: cannot move out of captured variable in an `Fn` closure
139 --> $DIR/move-into-closure.rs:64:41
141 LL | let mut em = Either::One(X(Y));
142 | ------ captured outer variable
144 LL | while let Either::One(mut _t) = em { }
147 | | cannot move out of captured variable in an `Fn` closure
148 | | help: consider borrowing here: `&em`
151 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
152 --> $DIR/move-into-closure.rs:64:31
154 LL | while let Either::One(mut _t) = em { }
157 error[E0507]: cannot move out of captured variable in an `Fn` closure
158 --> $DIR/move-into-closure.rs:68:15
160 LL | let mut em = Either::One(X(Y));
161 | ------ captured outer variable
166 | cannot move out of captured variable in an `Fn` closure
167 | help: consider borrowing here: `&em`
169 LL | Either::One(mut _t)
170 | ------ data moved here
172 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
173 --> $DIR/move-into-closure.rs:72:25
175 LL | Either::One(mut _t)
178 error[E0507]: cannot move out of captured variable in an `Fn` closure
179 --> $DIR/move-into-closure.rs:75:15
181 LL | let mut em = Either::One(X(Y));
182 | ------ captured outer variable
187 | cannot move out of captured variable in an `Fn` closure
188 | help: consider borrowing here: `&em`
190 LL | Either::One(mut _t) => (),
191 | ------ data moved here
193 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
194 --> $DIR/move-into-closure.rs:79:25
196 LL | Either::One(mut _t) => (),
199 error[E0507]: cannot move out of captured variable in an `FnMut` closure
200 --> $DIR/move-into-closure.rs:95:21
203 | - captured outer variable
208 | | cannot move out of captured variable in an `FnMut` closure
209 | | help: consider borrowing here: `&x`
212 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
213 --> $DIR/move-into-closure.rs:95:15
218 error[E0507]: cannot move out of captured variable in an `FnMut` closure
219 --> $DIR/move-into-closure.rs:99:34
221 LL | let e = Either::One(X(Y));
222 | - captured outer variable
224 LL | if let Either::One(_t) = e { }
227 | | cannot move out of captured variable in an `FnMut` closure
228 | | help: consider borrowing here: `&e`
231 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
232 --> $DIR/move-into-closure.rs:99:28
234 LL | if let Either::One(_t) = e { }
237 error[E0507]: cannot move out of captured variable in an `FnMut` closure
238 --> $DIR/move-into-closure.rs:103:37
240 LL | let e = Either::One(X(Y));
241 | - captured outer variable
243 LL | while let Either::One(_t) = e { }
246 | | cannot move out of captured variable in an `FnMut` closure
247 | | help: consider borrowing here: `&e`
250 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
251 --> $DIR/move-into-closure.rs:103:31
253 LL | while let Either::One(_t) = e { }
256 error[E0507]: cannot move out of captured variable in an `FnMut` closure
257 --> $DIR/move-into-closure.rs:107:15
259 LL | let e = Either::One(X(Y));
260 | - captured outer variable
265 | cannot move out of captured variable in an `FnMut` closure
266 | help: consider borrowing here: `&e`
271 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
272 --> $DIR/move-into-closure.rs:111:25
277 error[E0507]: cannot move out of captured variable in an `FnMut` closure
278 --> $DIR/move-into-closure.rs:114:15
280 LL | let e = Either::One(X(Y));
281 | - captured outer variable
286 | cannot move out of captured variable in an `FnMut` closure
287 | help: consider borrowing here: `&e`
289 LL | Either::One(_t) => (),
292 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
293 --> $DIR/move-into-closure.rs:118:25
295 LL | Either::One(_t) => (),
298 error[E0507]: cannot move out of captured variable in an `FnMut` closure
299 --> $DIR/move-into-closure.rs:123:25
302 | - captured outer variable
304 LL | let X(mut _t) = x;
307 | | cannot move out of captured variable in an `FnMut` closure
308 | | help: consider borrowing here: `&x`
311 note: move occurs because `_t` has type `Y`, which does not implement the `Copy` trait
312 --> $DIR/move-into-closure.rs:123:15
314 LL | let X(mut _t) = x;
317 error[E0507]: cannot move out of captured variable in an `FnMut` closure
318 --> $DIR/move-into-closure.rs:127:38
320 LL | let mut em = Either::One(X(Y));
321 | ------ captured outer variable
323 LL | if let Either::One(mut _t) = em { }
326 | | cannot move out of captured variable in an `FnMut` closure
327 | | help: consider borrowing here: `&em`
330 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
331 --> $DIR/move-into-closure.rs:127:28
333 LL | if let Either::One(mut _t) = em { }
336 error[E0507]: cannot move out of captured variable in an `FnMut` closure
337 --> $DIR/move-into-closure.rs:131:41
339 LL | let mut em = Either::One(X(Y));
340 | ------ captured outer variable
342 LL | while let Either::One(mut _t) = em { }
345 | | cannot move out of captured variable in an `FnMut` closure
346 | | help: consider borrowing here: `&em`
349 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
350 --> $DIR/move-into-closure.rs:131:31
352 LL | while let Either::One(mut _t) = em { }
355 error[E0507]: cannot move out of captured variable in an `FnMut` closure
356 --> $DIR/move-into-closure.rs:135:15
358 LL | let mut em = Either::One(X(Y));
359 | ------ captured outer variable
364 | cannot move out of captured variable in an `FnMut` closure
365 | help: consider borrowing here: `&em`
367 LL | Either::One(mut _t)
368 | ------ data moved here
370 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
371 --> $DIR/move-into-closure.rs:139:25
373 LL | Either::One(mut _t)
376 error[E0507]: cannot move out of captured variable in an `FnMut` closure
377 --> $DIR/move-into-closure.rs:142:15
379 LL | let mut em = Either::One(X(Y));
380 | ------ captured outer variable
385 | cannot move out of captured variable in an `FnMut` closure
386 | help: consider borrowing here: `&em`
388 LL | Either::One(mut _t) => (),
389 | ------ data moved here
391 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
392 --> $DIR/move-into-closure.rs:146:25
394 LL | Either::One(mut _t) => (),
397 error[E0507]: cannot move out of captured variable in an `FnMut` closure
398 --> $DIR/move-into-closure.rs:150:15
400 LL | let mut em = Either::One(X(Y));
401 | ------ captured outer variable
406 | cannot move out of captured variable in an `FnMut` closure
407 | help: consider borrowing here: `&em`
409 LL | Either::One(mut _t) => (),
410 | ------ data moved here
412 note: move occurs because `_t` has type `X`, which does not implement the `Copy` trait
413 --> $DIR/move-into-closure.rs:154:25
415 LL | Either::One(mut _t) => (),
418 error: aborting due to 21 previous errors
420 For more information about this error, try `rustc --explain E0507`.