]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/move_closure.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / closures / 2229_closure_analysis / move_closure.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/move_closure.rs:12:17
3    |
4 LL |     let mut c = #[rustc_capture_analysis]
5    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
8    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
9
10 error[E0658]: attributes on expressions are experimental
11   --> $DIR/move_closure.rs:30:17
12    |
13 LL |     let mut c = #[rustc_capture_analysis]
14    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
15    |
16    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
17    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
18
19 error[E0658]: attributes on expressions are experimental
20   --> $DIR/move_closure.rs:51:17
21    |
22 LL |     let mut c = #[rustc_capture_analysis]
23    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
24    |
25    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
26    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
27
28 error[E0658]: attributes on expressions are experimental
29   --> $DIR/move_closure.rs:74:17
30    |
31 LL |     let mut c = #[rustc_capture_analysis]
32    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
33    |
34    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
35    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
36
37 error[E0658]: attributes on expressions are experimental
38   --> $DIR/move_closure.rs:96:17
39    |
40 LL |     let mut c = #[rustc_capture_analysis]
41    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
42    |
43    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
44    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
45
46 error[E0658]: attributes on expressions are experimental
47   --> $DIR/move_closure.rs:117:13
48    |
49 LL |     let c = #[rustc_capture_analysis]
50    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
51    |
52    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
53    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
54
55 error[E0658]: attributes on expressions are experimental
56   --> $DIR/move_closure.rs:133:13
57    |
58 LL |     let c = #[rustc_capture_analysis]
59    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
60    |
61    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
62    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
63
64 error[E0658]: attributes on expressions are experimental
65   --> $DIR/move_closure.rs:150:13
66    |
67 LL |     let c = #[rustc_capture_analysis]
68    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
69    |
70    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
71    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
72
73 error[E0658]: attributes on expressions are experimental
74   --> $DIR/move_closure.rs:172:13
75    |
76 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
77    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
78    |
79    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
80    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
81
82 error[E0658]: attributes on expressions are experimental
83   --> $DIR/move_closure.rs:189:13
84    |
85 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
86    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
87    |
88    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
89    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
90
91 error[E0658]: attributes on expressions are experimental
92   --> $DIR/move_closure.rs:202:13
93    |
94 LL |     let c = #[rustc_capture_analysis] move || x;
95    |             ^^^^^^^^^^^^^^^^^^^^^^^^^
96    |
97    = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
98    = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
99
100 error: First Pass analysis includes:
101   --> $DIR/move_closure.rs:202:39
102    |
103 LL |     let c = #[rustc_capture_analysis] move || x;
104    |                                       ^^^^^^^^^
105    |
106 note: Capturing x[] -> ImmBorrow
107   --> $DIR/move_closure.rs:202:47
108    |
109 LL |     let c = #[rustc_capture_analysis] move || x;
110    |                                               ^
111
112 error: Min Capture analysis includes:
113   --> $DIR/move_closure.rs:202:39
114    |
115 LL |     let c = #[rustc_capture_analysis] move || x;
116    |                                       ^^^^^^^^^
117    |
118 note: Min Capture x[] -> ByValue
119   --> $DIR/move_closure.rs:202:47
120    |
121 LL |     let c = #[rustc_capture_analysis] move || x;
122    |                                               ^
123
124 error: First Pass analysis includes:
125   --> $DIR/move_closure.rs:15:5
126    |
127 LL | /     move || {
128 LL | |
129 LL | |
130 LL | |         t.0.0 = "new S".into();
131 LL | |
132 LL | |
133 LL | |     };
134    | |_____^
135    |
136 note: Capturing t[(0, 0),(0, 0)] -> MutBorrow
137   --> $DIR/move_closure.rs:18:9
138    |
139 LL |         t.0.0 = "new S".into();
140    |         ^^^^^
141
142 error: Min Capture analysis includes:
143   --> $DIR/move_closure.rs:15:5
144    |
145 LL | /     move || {
146 LL | |
147 LL | |
148 LL | |         t.0.0 = "new S".into();
149 LL | |
150 LL | |
151 LL | |     };
152    | |_____^
153    |
154 note: Min Capture t[(0, 0),(0, 0)] -> ByValue
155   --> $DIR/move_closure.rs:18:9
156    |
157 LL |         t.0.0 = "new S".into();
158    |         ^^^^^
159
160 error: First Pass analysis includes:
161   --> $DIR/move_closure.rs:33:5
162    |
163 LL | /     move || {
164 LL | |
165 LL | |
166 LL | |         *ref_s += 10;
167 LL | |
168 LL | |
169 LL | |     };
170    | |_____^
171    |
172 note: Capturing ref_s[Deref] -> MutBorrow
173   --> $DIR/move_closure.rs:36:9
174    |
175 LL |         *ref_s += 10;
176    |         ^^^^^^
177
178 error: Min Capture analysis includes:
179   --> $DIR/move_closure.rs:33:5
180    |
181 LL | /     move || {
182 LL | |
183 LL | |
184 LL | |         *ref_s += 10;
185 LL | |
186 LL | |
187 LL | |     };
188    | |_____^
189    |
190 note: Min Capture ref_s[] -> ByValue
191   --> $DIR/move_closure.rs:36:9
192    |
193 LL |         *ref_s += 10;
194    |         ^^^^^^
195
196 error: First Pass analysis includes:
197   --> $DIR/move_closure.rs:54:5
198    |
199 LL | /     move || {
200 LL | |
201 LL | |
202 LL | |         t.0.0 = "new s".into();
203 LL | |
204 LL | |
205 LL | |     };
206    | |_____^
207    |
208 note: Capturing t[(0, 0),Deref,(0, 0)] -> MutBorrow
209   --> $DIR/move_closure.rs:57:9
210    |
211 LL |         t.0.0 = "new s".into();
212    |         ^^^^^
213
214 error: Min Capture analysis includes:
215   --> $DIR/move_closure.rs:54:5
216    |
217 LL | /     move || {
218 LL | |
219 LL | |
220 LL | |         t.0.0 = "new s".into();
221 LL | |
222 LL | |
223 LL | |     };
224    | |_____^
225    |
226 note: Min Capture t[(0, 0)] -> ByValue
227   --> $DIR/move_closure.rs:57:9
228    |
229 LL |         t.0.0 = "new s".into();
230    |         ^^^^^
231
232 error: First Pass analysis includes:
233   --> $DIR/move_closure.rs:77:5
234    |
235 LL | /     move || {
236 LL | |
237 LL | |
238 LL | |         let _t = t.0.0;
239 LL | |
240 LL | |
241 LL | |     };
242    | |_____^
243    |
244 note: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
245   --> $DIR/move_closure.rs:80:18
246    |
247 LL |         let _t = t.0.0;
248    |                  ^^^^^
249
250 error: Min Capture analysis includes:
251   --> $DIR/move_closure.rs:77:5
252    |
253 LL | /     move || {
254 LL | |
255 LL | |
256 LL | |         let _t = t.0.0;
257 LL | |
258 LL | |
259 LL | |     };
260    | |_____^
261    |
262 note: Min Capture t[(0, 0)] -> ByValue
263   --> $DIR/move_closure.rs:80:18
264    |
265 LL |         let _t = t.0.0;
266    |                  ^^^^^
267
268 error: First Pass analysis includes:
269   --> $DIR/move_closure.rs:99:5
270    |
271 LL | /     move || {
272 LL | |
273 LL | |
274 LL | |         let _t = t.0.0;
275 LL | |
276 LL | |
277 LL | |     };
278    | |_____^
279    |
280 note: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue
281   --> $DIR/move_closure.rs:102:18
282    |
283 LL |         let _t = t.0.0;
284    |                  ^^^^^
285
286 error: Min Capture analysis includes:
287   --> $DIR/move_closure.rs:99:5
288    |
289 LL | /     move || {
290 LL | |
291 LL | |
292 LL | |         let _t = t.0.0;
293 LL | |
294 LL | |
295 LL | |     };
296    | |_____^
297    |
298 note: Min Capture t[(0, 0)] -> ByValue
299   --> $DIR/move_closure.rs:102:18
300    |
301 LL |         let _t = t.0.0;
302    |                  ^^^^^
303
304 error: First Pass analysis includes:
305   --> $DIR/move_closure.rs:120:5
306    |
307 LL | /     move || {
308 LL | |
309 LL | |
310 LL | |         let _t = b.0;
311 LL | |
312 LL | |
313 LL | |     };
314    | |_____^
315    |
316 note: Capturing b[Deref,(0, 0)] -> ImmBorrow
317   --> $DIR/move_closure.rs:123:18
318    |
319 LL |         let _t = b.0;
320    |                  ^^^
321
322 error: Min Capture analysis includes:
323   --> $DIR/move_closure.rs:120:5
324    |
325 LL | /     move || {
326 LL | |
327 LL | |
328 LL | |         let _t = b.0;
329 LL | |
330 LL | |
331 LL | |     };
332    | |_____^
333    |
334 note: Min Capture b[] -> ByValue
335   --> $DIR/move_closure.rs:123:18
336    |
337 LL |         let _t = b.0;
338    |                  ^^^
339
340 error: First Pass analysis includes:
341   --> $DIR/move_closure.rs:136:5
342    |
343 LL | /     move || {
344 LL | |
345 LL | |
346 LL | |         println!("{}", b.0);
347 LL | |
348 LL | |
349 LL | |     };
350    | |_____^
351    |
352 note: Capturing b[Deref,(0, 0)] -> ImmBorrow
353   --> $DIR/move_closure.rs:139:24
354    |
355 LL |         println!("{}", b.0);
356    |                        ^^^
357
358 error: Min Capture analysis includes:
359   --> $DIR/move_closure.rs:136:5
360    |
361 LL | /     move || {
362 LL | |
363 LL | |
364 LL | |         println!("{}", b.0);
365 LL | |
366 LL | |
367 LL | |     };
368    | |_____^
369    |
370 note: Min Capture b[] -> ByValue
371   --> $DIR/move_closure.rs:139:24
372    |
373 LL |         println!("{}", b.0);
374    |                        ^^^
375
376 error: First Pass analysis includes:
377   --> $DIR/move_closure.rs:153:5
378    |
379 LL | /     move || {
380 LL | |
381 LL | |
382 LL | |         println!("{}", t.1.0);
383 LL | |
384 LL | |
385 LL | |     };
386    | |_____^
387    |
388 note: Capturing t[(1, 0),Deref,(0, 0)] -> ImmBorrow
389   --> $DIR/move_closure.rs:156:24
390    |
391 LL |         println!("{}", t.1.0);
392    |                        ^^^^^
393
394 error: Min Capture analysis includes:
395   --> $DIR/move_closure.rs:153:5
396    |
397 LL | /     move || {
398 LL | |
399 LL | |
400 LL | |         println!("{}", t.1.0);
401 LL | |
402 LL | |
403 LL | |     };
404    | |_____^
405    |
406 note: Min Capture t[(1, 0)] -> ByValue
407   --> $DIR/move_closure.rs:156:24
408    |
409 LL |         println!("{}", t.1.0);
410    |                        ^^^^^
411
412 error: First Pass analysis includes:
413   --> $DIR/move_closure.rs:172:39
414    |
415 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
416    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
417    |
418 note: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow
419   --> $DIR/move_closure.rs:172:47
420    |
421 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
422    |                                               ^^^^^^^^^^^
423
424 error: Min Capture analysis includes:
425   --> $DIR/move_closure.rs:172:39
426    |
427 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
428    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
429    |
430 note: Min Capture box_p_foo[] -> ByValue
431   --> $DIR/move_closure.rs:172:47
432    |
433 LL |     let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
434    |                                               ^^^^^^^^^^^
435
436 error: First Pass analysis includes:
437   --> $DIR/move_closure.rs:189:39
438    |
439 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
440    |                                       ^^^^^^^^^^^^^^^^^^^^^
441    |
442 note: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow
443   --> $DIR/move_closure.rs:189:47
444    |
445 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
446    |                                               ^^^^^^^
447
448 error: Min Capture analysis includes:
449   --> $DIR/move_closure.rs:189:39
450    |
451 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
452    |                                       ^^^^^^^^^^^^^^^^^^^^^
453    |
454 note: Min Capture p_foo[] -> ByValue
455   --> $DIR/move_closure.rs:189:47
456    |
457 LL |     let c = #[rustc_capture_analysis] move || p_foo.x += 10;
458    |                                               ^^^^^^^
459
460 error: aborting due to 33 previous errors
461
462 For more information about this error, try `rustc --explain E0658`.