@@ -44,7 +44,7 @@ LL | let mut c = #[rustc_capture_analysis]
44
44
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
45
45
46
46
error[E0658]: attributes on expressions are experimental
47
- --> $DIR/move_closure.rs:118 :13
47
+ --> $DIR/move_closure.rs:117 :13
48
48
|
49
49
LL | let c = #[rustc_capture_analysis]
50
50
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -53,7 +53,7 @@ LL | let c = #[rustc_capture_analysis]
53
53
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
54
54
55
55
error[E0658]: attributes on expressions are experimental
56
- --> $DIR/move_closure.rs:135 :13
56
+ --> $DIR/move_closure.rs:133 :13
57
57
|
58
58
LL | let c = #[rustc_capture_analysis]
59
59
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -62,14 +62,32 @@ LL | let c = #[rustc_capture_analysis]
62
62
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
63
63
64
64
error[E0658]: attributes on expressions are experimental
65
- --> $DIR/move_closure.rs:152 :13
65
+ --> $DIR/move_closure.rs:150 :13
66
66
|
67
67
LL | let c = #[rustc_capture_analysis]
68
68
| ^^^^^^^^^^^^^^^^^^^^^^^^^
69
69
|
70
70
= note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information
71
71
= help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable
72
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
+
73
91
error: First Pass analysis includes:
74
92
--> $DIR/move_closure.rs:15:5
75
93
|
@@ -82,7 +100,7 @@ LL | |
82
100
LL | | };
83
101
| |_____^
84
102
|
85
- note: Capturing t[(0, 0),(0, 0)] -> ByValue
103
+ note: Capturing t[(0, 0),(0, 0)] -> MutBorrow
86
104
--> $DIR/move_closure.rs:18:9
87
105
|
88
106
LL | t.0.0 = "new S".into();
@@ -190,7 +208,7 @@ LL | |
190
208
LL | | };
191
209
| |_____^
192
210
|
193
- note: Capturing t[(0, 0),Deref] -> ImmBorrow
211
+ note: Capturing t[(0, 0),Deref,(0, 0) ] -> ImmBorrow
194
212
--> $DIR/move_closure.rs:80:18
195
213
|
196
214
LL | let _t = t.0.0;
@@ -221,17 +239,12 @@ LL | / move || {
221
239
LL | |
222
240
LL | |
223
241
LL | | let _t = t.0.0;
224
- ... |
242
+ LL | |
225
243
LL | |
226
244
LL | | };
227
245
| |_____^
228
246
|
229
- note: Capturing t[(0, 0),Deref] -> ImmBorrow
230
- --> $DIR/move_closure.rs:102:18
231
- |
232
- LL | let _t = t.0.0;
233
- | ^^^^^
234
- note: Capturing t[(0, 0)] -> ByValue
247
+ note: Capturing t[(0, 0),Deref,(0, 0)] -> ByValue
235
248
--> $DIR/move_closure.rs:102:18
236
249
|
237
250
LL | let _t = t.0.0;
@@ -244,7 +257,7 @@ LL | / move || {
244
257
LL | |
245
258
LL | |
246
259
LL | | let _t = t.0.0;
247
- ... |
260
+ LL | |
248
261
LL | |
249
262
LL | | };
250
263
| |_____^
@@ -256,48 +269,43 @@ LL | let _t = t.0.0;
256
269
| ^^^^^
257
270
258
271
error: First Pass analysis includes:
259
- --> $DIR/move_closure.rs:121 :5
272
+ --> $DIR/move_closure.rs:120 :5
260
273
|
261
274
LL | / move || {
262
275
LL | |
263
276
LL | |
264
277
LL | | let _t = b.0;
265
- ... |
278
+ LL | |
266
279
LL | |
267
280
LL | | };
268
281
| |_____^
269
282
|
270
- note: Capturing b[Deref,(0, 0)] -> ByValue
271
- --> $DIR/move_closure.rs:124:18
272
- |
273
- LL | let _t = b.0;
274
- | ^^^
275
- note: Capturing b[] -> ByValue
276
- --> $DIR/move_closure.rs:124:18
283
+ note: Capturing b[Deref,(0, 0)] -> ImmBorrow
284
+ --> $DIR/move_closure.rs:123:18
277
285
|
278
286
LL | let _t = b.0;
279
287
| ^^^
280
288
281
289
error: Min Capture analysis includes:
282
- --> $DIR/move_closure.rs:121 :5
290
+ --> $DIR/move_closure.rs:120 :5
283
291
|
284
292
LL | / move || {
285
293
LL | |
286
294
LL | |
287
295
LL | | let _t = b.0;
288
- ... |
296
+ LL | |
289
297
LL | |
290
298
LL | | };
291
299
| |_____^
292
300
|
293
301
note: Min Capture b[] -> ByValue
294
- --> $DIR/move_closure.rs:124 :18
302
+ --> $DIR/move_closure.rs:123 :18
295
303
|
296
304
LL | let _t = b.0;
297
305
| ^^^
298
306
299
307
error: First Pass analysis includes:
300
- --> $DIR/move_closure.rs:138 :5
308
+ --> $DIR/move_closure.rs:136 :5
301
309
|
302
310
LL | / move || {
303
311
LL | |
@@ -308,14 +316,14 @@ LL | |
308
316
LL | | };
309
317
| |_____^
310
318
|
311
- note: Capturing b[Deref,(0, 0)] -> ByValue
312
- --> $DIR/move_closure.rs:141 :24
319
+ note: Capturing b[Deref,(0, 0)] -> ImmBorrow
320
+ --> $DIR/move_closure.rs:139 :24
313
321
|
314
322
LL | println!("{}", b.0);
315
323
| ^^^
316
324
317
325
error: Min Capture analysis includes:
318
- --> $DIR/move_closure.rs:138 :5
326
+ --> $DIR/move_closure.rs:136 :5
319
327
|
320
328
LL | / move || {
321
329
LL | |
@@ -327,13 +335,13 @@ LL | | };
327
335
| |_____^
328
336
|
329
337
note: Min Capture b[] -> ByValue
330
- --> $DIR/move_closure.rs:141 :24
338
+ --> $DIR/move_closure.rs:139 :24
331
339
|
332
340
LL | println!("{}", b.0);
333
341
| ^^^
334
342
335
343
error: First Pass analysis includes:
336
- --> $DIR/move_closure.rs:155 :5
344
+ --> $DIR/move_closure.rs:153 :5
337
345
|
338
346
LL | / move || {
339
347
LL | |
@@ -344,14 +352,14 @@ LL | |
344
352
LL | | };
345
353
| |_____^
346
354
|
347
- note: Capturing t[(1, 0),Deref,(0, 0)] -> ByValue
348
- --> $DIR/move_closure.rs:158 :24
355
+ note: Capturing t[(1, 0),Deref,(0, 0)] -> ImmBorrow
356
+ --> $DIR/move_closure.rs:156 :24
349
357
|
350
358
LL | println!("{}", t.1.0);
351
359
| ^^^^^
352
360
353
361
error: Min Capture analysis includes:
354
- --> $DIR/move_closure.rs:155 :5
362
+ --> $DIR/move_closure.rs:153 :5
355
363
|
356
364
LL | / move || {
357
365
LL | |
@@ -363,11 +371,59 @@ LL | | };
363
371
| |_____^
364
372
|
365
373
note: Min Capture t[(1, 0)] -> ByValue
366
- --> $DIR/move_closure.rs:158 :24
374
+ --> $DIR/move_closure.rs:156 :24
367
375
|
368
376
LL | println!("{}", t.1.0);
369
377
| ^^^^^
370
378
371
- error: aborting due to 24 previous errors
379
+ error: First Pass analysis includes:
380
+ --> $DIR/move_closure.rs:172:39
381
+ |
382
+ LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
383
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
384
+ |
385
+ note: Capturing box_p_foo[Deref,Deref,(0, 0)] -> UniqueImmBorrow
386
+ --> $DIR/move_closure.rs:172:47
387
+ |
388
+ LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
389
+ | ^^^^^^^^^^^
390
+
391
+ error: Min Capture analysis includes:
392
+ --> $DIR/move_closure.rs:172:39
393
+ |
394
+ LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
395
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
396
+ |
397
+ note: Min Capture box_p_foo[Deref,Deref,(0, 0)] -> UniqueImmBorrow
398
+ --> $DIR/move_closure.rs:172:47
399
+ |
400
+ LL | let c = #[rustc_capture_analysis] move || box_p_foo.x += 10;
401
+ | ^^^^^^^^^^^
402
+
403
+ error: First Pass analysis includes:
404
+ --> $DIR/move_closure.rs:189:39
405
+ |
406
+ LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10;
407
+ | ^^^^^^^^^^^^^^^^^^^^^
408
+ |
409
+ note: Capturing p_foo[Deref,Deref,(0, 0)] -> UniqueImmBorrow
410
+ --> $DIR/move_closure.rs:189:47
411
+ |
412
+ LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10;
413
+ | ^^^^^^^
414
+
415
+ error: Min Capture analysis includes:
416
+ --> $DIR/move_closure.rs:189:39
417
+ |
418
+ LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10;
419
+ | ^^^^^^^^^^^^^^^^^^^^^
420
+ |
421
+ note: Min Capture p_foo[Deref,Deref,(0, 0)] -> UniqueImmBorrow
422
+ --> $DIR/move_closure.rs:189:47
423
+ |
424
+ LL | let c = #[rustc_capture_analysis] move || p_foo.x += 10;
425
+ | ^^^^^^^
426
+
427
+ error: aborting due to 30 previous errors
372
428
373
429
For more information about this error, try `rustc --explain E0658`.
0 commit comments