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