]>
Commit | Line | Data |
---|---|---|
74b04a01 | 1 | error: borrow of moved value |
94222f64 | 2 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:22:9 |
74b04a01 XL |
3 | | |
4 | LL | let a @ ref b = U; | |
5 | | -^^^----- | |
6 | | | | | |
7 | | | value borrowed here after move | |
8 | | value moved into `a` here | |
1b1a35ee | 9 | | move occurs because `a` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
10 | |
11 | error: borrow of moved value | |
94222f64 | 12 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9 |
74b04a01 XL |
13 | | |
14 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | |
15 | | -^^^^^^^^^^^^---------^^^^^^-----^ | |
16 | | | | | | |
17 | | | | value borrowed here after move | |
18 | | | value borrowed here after move | |
19 | | value moved into `a` here | |
1b1a35ee | 20 | | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait |
74b04a01 XL |
21 | |
22 | error: borrow of moved value | |
94222f64 | 23 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:14 |
74b04a01 XL |
24 | | |
25 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | |
26 | | -----^^^--------- | |
27 | | | | | |
28 | | | value borrowed here after move | |
29 | | value moved into `b` here | |
1b1a35ee | 30 | | move occurs because `b` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
31 | |
32 | error: borrow of moved value | |
94222f64 | 33 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:33 |
74b04a01 XL |
34 | | |
35 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | |
36 | | -^^^----- | |
37 | | | | | |
38 | | | value borrowed here after move | |
39 | | value moved into `d` here | |
1b1a35ee | 40 | | move occurs because `d` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
41 | |
42 | error: borrow of moved value | |
94222f64 | 43 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9 |
74b04a01 XL |
44 | | |
45 | LL | let a @ [ref mut b, ref c] = [U, U]; | |
46 | | -^^^^---------^^-----^ | |
47 | | | | | | |
48 | | | | value borrowed here after move | |
49 | | | value borrowed here after move | |
50 | | value moved into `a` here | |
1b1a35ee | 51 | | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait |
74b04a01 XL |
52 | |
53 | error: borrow of moved value | |
94222f64 | 54 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9 |
74b04a01 XL |
55 | | |
56 | LL | let a @ ref b = u(); | |
57 | | -^^^----- | |
58 | | | | | |
59 | | | value borrowed here after move | |
60 | | value moved into `a` here | |
1b1a35ee | 61 | | move occurs because `a` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
62 | |
63 | error: borrow of moved value | |
94222f64 | 64 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9 |
74b04a01 XL |
65 | | |
66 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | |
67 | | -^^^^^^^^^^^^---------^^^^^^-----^ | |
68 | | | | | | |
69 | | | | value borrowed here after move | |
70 | | | value borrowed here after move | |
71 | | value moved into `a` here | |
1b1a35ee | 72 | | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait |
74b04a01 XL |
73 | |
74 | error: borrow of moved value | |
94222f64 | 75 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:14 |
74b04a01 XL |
76 | | |
77 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | |
78 | | -----^^^--------- | |
79 | | | | | |
80 | | | value borrowed here after move | |
81 | | value moved into `b` here | |
1b1a35ee | 82 | | move occurs because `b` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
83 | |
84 | error: borrow of moved value | |
94222f64 | 85 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:33 |
74b04a01 XL |
86 | | |
87 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | |
88 | | -^^^----- | |
89 | | | | | |
90 | | | value borrowed here after move | |
91 | | value moved into `d` here | |
1b1a35ee | 92 | | move occurs because `d` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
93 | |
94 | error: borrow of moved value | |
94222f64 | 95 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9 |
74b04a01 XL |
96 | | |
97 | LL | let a @ [ref mut b, ref c] = [u(), u()]; | |
98 | | -^^^^---------^^-----^ | |
99 | | | | | | |
100 | | | | value borrowed here after move | |
101 | | | value borrowed here after move | |
102 | | value moved into `a` here | |
1b1a35ee | 103 | | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait |
74b04a01 XL |
104 | |
105 | error: borrow of moved value | |
94222f64 | 106 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:42:9 |
74b04a01 XL |
107 | | |
108 | LL | a @ Some(ref b) => {} | |
109 | | -^^^^^^^^-----^ | |
110 | | | | | |
111 | | | value borrowed here after move | |
112 | | value moved into `a` here | |
1b1a35ee | 113 | | move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait |
74b04a01 XL |
114 | |
115 | error: borrow of moved value | |
94222f64 | 116 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:9 |
74b04a01 XL |
117 | | |
118 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
119 | | -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^ | |
120 | | | | | | |
121 | | | | value borrowed here after move | |
122 | | | value borrowed here after move | |
123 | | value moved into `a` here | |
1b1a35ee | 124 | | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait |
74b04a01 XL |
125 | |
126 | error: borrow of moved value | |
94222f64 | 127 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:19 |
74b04a01 XL |
128 | | |
129 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
130 | | -----^^^--------- | |
131 | | | | | |
132 | | | value borrowed here after move | |
133 | | value moved into `b` here | |
1b1a35ee | 134 | | move occurs because `b` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
135 | |
136 | error: borrow of moved value | |
94222f64 | 137 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38 |
74b04a01 XL |
138 | | |
139 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
140 | | -^^^----- | |
141 | | | | | |
142 | | | value borrowed here after move | |
143 | | value moved into `d` here | |
1b1a35ee | 144 | | move occurs because `d` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
145 | |
146 | error: borrow of moved value | |
94222f64 | 147 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:9 |
74b04a01 XL |
148 | | |
149 | LL | mut a @ Some([ref b, ref mut c]) => {} | |
150 | | -----^^^^^^^^^-----^^---------^^ | |
151 | | | | | | |
152 | | | | value borrowed here after move | |
153 | | | value borrowed here after move | |
154 | | value moved into `a` here | |
1b1a35ee | 155 | | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait |
74b04a01 XL |
156 | |
157 | error: borrow of moved value | |
94222f64 | 158 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9 |
74b04a01 XL |
159 | | |
160 | LL | a @ Some(ref b) => {} | |
161 | | -^^^^^^^^-----^ | |
162 | | | | | |
163 | | | value borrowed here after move | |
164 | | value moved into `a` here | |
1b1a35ee | 165 | | move occurs because `a` has type `Option<U>` which does not implement the `Copy` trait |
74b04a01 XL |
166 | |
167 | error: borrow of moved value | |
94222f64 | 168 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:9 |
74b04a01 XL |
169 | | |
170 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
171 | | -^^^^^^^^^^^^^^^^^---------^^^^^^-----^^ | |
172 | | | | | | |
173 | | | | value borrowed here after move | |
174 | | | value borrowed here after move | |
175 | | value moved into `a` here | |
1b1a35ee | 176 | | move occurs because `a` has type `Option<(U, U)>` which does not implement the `Copy` trait |
74b04a01 XL |
177 | |
178 | error: borrow of moved value | |
94222f64 | 179 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:19 |
74b04a01 XL |
180 | | |
181 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
182 | | -----^^^--------- | |
183 | | | | | |
184 | | | value borrowed here after move | |
185 | | value moved into `b` here | |
1b1a35ee | 186 | | move occurs because `b` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
187 | |
188 | error: borrow of moved value | |
94222f64 | 189 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38 |
74b04a01 XL |
190 | | |
191 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} | |
192 | | -^^^----- | |
193 | | | | | |
194 | | | value borrowed here after move | |
195 | | value moved into `d` here | |
1b1a35ee | 196 | | move occurs because `d` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
197 | |
198 | error: borrow of moved value | |
94222f64 | 199 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:9 |
74b04a01 XL |
200 | | |
201 | LL | mut a @ Some([ref b, ref mut c]) => {} | |
202 | | -----^^^^^^^^^-----^^---------^^ | |
203 | | | | | | |
204 | | | | value borrowed here after move | |
205 | | | value borrowed here after move | |
206 | | value moved into `a` here | |
1b1a35ee | 207 | | move occurs because `a` has type `Option<[U; 2]>` which does not implement the `Copy` trait |
74b04a01 XL |
208 | |
209 | error: borrow of moved value | |
94222f64 | 210 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11 |
74b04a01 XL |
211 | | |
212 | LL | fn f1(a @ ref b: U) {} | |
213 | | -^^^----- | |
214 | | | | | |
215 | | | value borrowed here after move | |
216 | | value moved into `a` here | |
1b1a35ee | 217 | | move occurs because `a` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
218 | |
219 | error: borrow of moved value | |
94222f64 | 220 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11 |
74b04a01 XL |
221 | | |
222 | LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | |
223 | | -----^^^^^^^^-----^^^^^^^^^^-----^ | |
224 | | | | | | |
225 | | | | value borrowed here after move | |
226 | | | value borrowed here after move | |
227 | | value moved into `a` here | |
1b1a35ee | 228 | | move occurs because `a` has type `(U, U)` which does not implement the `Copy` trait |
74b04a01 XL |
229 | |
230 | error: borrow of moved value | |
94222f64 | 231 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:20 |
74b04a01 XL |
232 | | |
233 | LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | |
234 | | -^^^----- | |
235 | | | | | |
236 | | | value borrowed here after move | |
237 | | value moved into `b` here | |
1b1a35ee | 238 | | move occurs because `b` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
239 | |
240 | error: borrow of moved value | |
94222f64 | 241 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:31 |
74b04a01 XL |
242 | | |
243 | LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | |
244 | | -----^^^----- | |
245 | | | | | |
246 | | | value borrowed here after move | |
247 | | value moved into `d` here | |
1b1a35ee | 248 | | move occurs because `d` has type `U` which does not implement the `Copy` trait |
74b04a01 XL |
249 | |
250 | error: borrow of moved value | |
94222f64 | 251 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19:11 |
74b04a01 XL |
252 | | |
253 | LL | fn f3(a @ [ref mut b, ref c]: [U; 2]) {} | |
254 | | -^^^^---------^^-----^ | |
255 | | | | | | |
256 | | | | value borrowed here after move | |
257 | | | value borrowed here after move | |
258 | | value moved into `a` here | |
1b1a35ee | 259 | | move occurs because `a` has type `[U; 2]` which does not implement the `Copy` trait |
74b04a01 | 260 | |
29967ef6 | 261 | error[E0382]: use of partially moved value |
94222f64 | 262 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9 |
74b04a01 XL |
263 | | |
264 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (U, U); | |
f2b60f7d FG |
265 | | ^ - value partially moved here |
266 | | | | |
29967ef6 | 267 | | value used here after partial move |
74b04a01 | 268 | | |
29967ef6 | 269 | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait |
74b04a01 | 270 | |
29967ef6 | 271 | error[E0382]: use of partially moved value |
94222f64 | 272 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9 |
74b04a01 XL |
273 | | |
274 | LL | let a @ (mut b @ ref mut c, d @ ref e) = (u(), u()); | |
f2b60f7d FG |
275 | | ^ - value partially moved here |
276 | | | | |
29967ef6 | 277 | | value used here after partial move |
74b04a01 | 278 | | |
29967ef6 | 279 | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait |
74b04a01 XL |
280 | |
281 | error[E0382]: use of moved value | |
94222f64 | 282 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38 |
74b04a01 XL |
283 | | |
284 | LL | match Some((U, U)) { | |
1b1a35ee | 285 | | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait |
74b04a01 | 286 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} |
f2b60f7d | 287 | | - value moved here ^ value used here after move |
74b04a01 XL |
288 | |
289 | error[E0382]: borrow of moved value | |
94222f64 | 290 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30 |
74b04a01 XL |
291 | | |
292 | LL | match Some([U, U]) { | |
1b1a35ee | 293 | | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait |
74b04a01 | 294 | LL | mut a @ Some([ref b, ref mut c]) => {} |
f2b60f7d FG |
295 | | ----- ^^^^^^^^^ value borrowed here after move |
296 | | | | |
74b04a01 XL |
297 | | value moved here |
298 | ||
299 | error[E0382]: borrow of moved value | |
94222f64 | 300 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:18 |
74b04a01 XL |
301 | | |
302 | LL | match Some(u()) { | |
1b1a35ee | 303 | | --------- move occurs because value has type `Option<U>`, which does not implement the `Copy` trait |
74b04a01 | 304 | LL | a @ Some(ref b) => {} |
f2b60f7d FG |
305 | | - ^^^^^ value borrowed here after move |
306 | | | | |
74b04a01 XL |
307 | | value moved here |
308 | ||
74b04a01 | 309 | error[E0382]: use of moved value |
94222f64 | 310 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38 |
74b04a01 XL |
311 | | |
312 | LL | match Some((u(), u())) { | |
1b1a35ee | 313 | | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait |
74b04a01 | 314 | LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {} |
f2b60f7d | 315 | | - value moved here ^ value used here after move |
74b04a01 XL |
316 | |
317 | error[E0382]: borrow of moved value | |
94222f64 | 318 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30 |
74b04a01 XL |
319 | | |
320 | LL | match Some([u(), u()]) { | |
1b1a35ee | 321 | | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait |
74b04a01 | 322 | LL | mut a @ Some([ref b, ref mut c]) => {} |
f2b60f7d FG |
323 | | ----- ^^^^^^^^^ value borrowed here after move |
324 | | | | |
74b04a01 XL |
325 | | value moved here |
326 | ||
29967ef6 | 327 | error[E0382]: use of partially moved value |
94222f64 | 328 | --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11 |
74b04a01 XL |
329 | | |
330 | LL | fn f2(mut a @ (b @ ref c, mut d @ ref e): (U, U)) {} | |
f2b60f7d FG |
331 | | ^^^^^ ----- value partially moved here |
332 | | | | |
29967ef6 | 333 | | value used here after partial move |
74b04a01 | 334 | | |
29967ef6 | 335 | = note: partial move occurs because value has type `U`, which does not implement the `Copy` trait |
74b04a01 | 336 | |
29967ef6 | 337 | error: aborting due to 33 previous errors |
74b04a01 XL |
338 | |
339 | For more information about this error, try `rustc --explain E0382`. |