]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/deep-multilevel-tuple.stderr
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / closures / 2229_closure_analysis / deep-multilevel-tuple.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/deep-multilevel-tuple.rs:8:13
3    |
4 LL |     let 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: First Pass analysis includes:
11   --> $DIR/deep-multilevel-tuple.rs:11:5
12    |
13 LL | /     || {
14 LL | |
15 LL | |
16 LL | |         let x = &t.0.0.0;
17 ...  |
18 LL | |
19 LL | |     };
20    | |_____^
21    |
22 note: Capturing t[(0, 0),(0, 0),(0, 0)] -> ImmBorrow
23   --> $DIR/deep-multilevel-tuple.rs:14:18
24    |
25 LL |         let x = &t.0.0.0;
26    |                  ^^^^^^^
27 note: Capturing t[(1, 0),(1, 0),(1, 0)] -> MutBorrow
28   --> $DIR/deep-multilevel-tuple.rs:16:9
29    |
30 LL |         t.1.1.1 = 9;
31    |         ^^^^^^^
32 note: Capturing t[] -> ImmBorrow
33   --> $DIR/deep-multilevel-tuple.rs:19:26
34    |
35 LL |         println!("{:?}", t);
36    |                          ^
37
38 error: Min Capture analysis includes:
39   --> $DIR/deep-multilevel-tuple.rs:11:5
40    |
41 LL | /     || {
42 LL | |
43 LL | |
44 LL | |         let x = &t.0.0.0;
45 ...  |
46 LL | |
47 LL | |     };
48    | |_____^
49    |
50 note: Min Capture t[] -> MutBorrow
51   --> $DIR/deep-multilevel-tuple.rs:16:9
52    |
53 LL |         t.1.1.1 = 9;
54    |         ^^^^^^^ t[] captured as MutBorrow here
55 ...
56 LL |         println!("{:?}", t);
57    |                          ^ t[] used here
58
59 error: aborting due to 3 previous errors
60
61 For more information about this error, try `rustc --explain E0658`.