]> git.proxmox.com Git - rustc.git/blame - src/test/ui/pattern/bindings-after-at/borrowck-pat-by-move-and-ref-inverse.stderr
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / pattern / bindings-after-at / borrowck-pat-by-move-and-ref-inverse.stderr
CommitLineData
74b04a01 1error: borrow of moved value
94222f64 2 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:22:9
74b04a01
XL
3 |
4LL | 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
11error: borrow of moved value
94222f64 12 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
74b04a01
XL
13 |
14LL | 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
22error: borrow of moved value
94222f64 23 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:14
74b04a01
XL
24 |
25LL | 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
32error: borrow of moved value
94222f64 33 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:33
74b04a01
XL
34 |
35LL | 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
42error: borrow of moved value
94222f64 43 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:29:9
74b04a01
XL
44 |
45LL | 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
53error: borrow of moved value
94222f64 54 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:31:9
74b04a01
XL
55 |
56LL | 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
63error: borrow of moved value
94222f64 64 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
74b04a01
XL
65 |
66LL | 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
74error: borrow of moved value
94222f64 75 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:14
74b04a01
XL
76 |
77LL | 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
84error: borrow of moved value
94222f64 85 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:33
74b04a01
XL
86 |
87LL | 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
94error: borrow of moved value
94222f64 95 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:38:9
74b04a01
XL
96 |
97LL | 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
105error: borrow of moved value
94222f64 106 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:42:9
74b04a01
XL
107 |
108LL | 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
115error: borrow of moved value
94222f64 116 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:9
74b04a01
XL
117 |
118LL | 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
126error: borrow of moved value
94222f64 127 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:19
74b04a01
XL
128 |
129LL | 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
136error: borrow of moved value
94222f64 137 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
74b04a01
XL
138 |
139LL | 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
146error: borrow of moved value
94222f64 147 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:9
74b04a01
XL
148 |
149LL | 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
157error: borrow of moved value
94222f64 158 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:9
74b04a01
XL
159 |
160LL | 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
167error: borrow of moved value
94222f64 168 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:9
74b04a01
XL
169 |
170LL | 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
178error: borrow of moved value
94222f64 179 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:19
74b04a01
XL
180 |
181LL | 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
188error: borrow of moved value
94222f64 189 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
74b04a01
XL
190 |
191LL | 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
198error: borrow of moved value
94222f64 199 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:9
74b04a01
XL
200 |
201LL | 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
209error: borrow of moved value
94222f64 210 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:11:11
74b04a01
XL
211 |
212LL | 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
219error: borrow of moved value
94222f64 220 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
74b04a01
XL
221 |
222LL | 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
230error: borrow of moved value
94222f64 231 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:20
74b04a01
XL
232 |
233LL | 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
240error: borrow of moved value
94222f64 241 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:31
74b04a01
XL
242 |
243LL | 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
250error: borrow of moved value
94222f64 251 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:19:11
74b04a01
XL
252 |
253LL | 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 261error[E0382]: use of partially moved value
94222f64 262 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:24:9
74b04a01
XL
263 |
264LL | 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 271error[E0382]: use of partially moved value
94222f64 272 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:33:9
74b04a01
XL
273 |
274LL | 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
281error[E0382]: use of moved value
94222f64 282 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:47:38
74b04a01
XL
283 |
284LL | match Some((U, U)) {
1b1a35ee 285 | ------------ move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
74b04a01 286LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
f2b60f7d 287 | - value moved here ^ value used here after move
74b04a01
XL
288
289error[E0382]: borrow of moved value
94222f64 290 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:55:30
74b04a01
XL
291 |
292LL | match Some([U, U]) {
1b1a35ee 293 | ------------ move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
74b04a01 294LL | mut a @ Some([ref b, ref mut c]) => {}
f2b60f7d
FG
295 | ----- ^^^^^^^^^ value borrowed here after move
296 | |
74b04a01
XL
297 | value moved here
298
299error[E0382]: borrow of moved value
94222f64 300 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:61:18
74b04a01
XL
301 |
302LL | match Some(u()) {
1b1a35ee 303 | --------- move occurs because value has type `Option<U>`, which does not implement the `Copy` trait
74b04a01 304LL | a @ Some(ref b) => {}
f2b60f7d
FG
305 | - ^^^^^ value borrowed here after move
306 | |
74b04a01
XL
307 | value moved here
308
74b04a01 309error[E0382]: use of moved value
94222f64 310 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:67:38
74b04a01
XL
311 |
312LL | match Some((u(), u())) {
1b1a35ee 313 | ---------------- move occurs because value has type `Option<(U, U)>`, which does not implement the `Copy` trait
74b04a01 314LL | a @ Some((mut b @ ref mut c, d @ ref e)) => {}
f2b60f7d 315 | - value moved here ^ value used here after move
74b04a01
XL
316
317error[E0382]: borrow of moved value
94222f64 318 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:75:30
74b04a01
XL
319 |
320LL | match Some([u(), u()]) {
1b1a35ee 321 | ---------------- move occurs because value has type `Option<[U; 2]>`, which does not implement the `Copy` trait
74b04a01 322LL | 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 327error[E0382]: use of partially moved value
94222f64 328 --> $DIR/borrowck-pat-by-move-and-ref-inverse.rs:14:11
74b04a01
XL
329 |
330LL | 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 337error: aborting due to 33 previous errors
74b04a01
XL
338
339For more information about this error, try `rustc --explain E0382`.