]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/nested-closure.stderr
Rollup merge of #106144 - tgross35:patch-1, r=Mark-Simulacrum
[rust.git] / tests / ui / closures / 2229_closure_analysis / nested-closure.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/nested-closure.rs:19:18
3    |
4 LL |     let mut c1 = #[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/nested-closure.rs:29:22
12    |
13 LL |         let mut c2 = #[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: First Pass analysis includes:
20   --> $DIR/nested-closure.rs:32:9
21    |
22 LL |         || p.y += incr;
23    |         ^^^^^^^^^^^^^^
24    |
25 note: Capturing p[(1, 0)] -> MutBorrow
26   --> $DIR/nested-closure.rs:32:12
27    |
28 LL |         || p.y += incr;
29    |            ^^^
30 note: Capturing incr[] -> ImmBorrow
31   --> $DIR/nested-closure.rs:32:19
32    |
33 LL |         || p.y += incr;
34    |                   ^^^^
35
36 error: Min Capture analysis includes:
37   --> $DIR/nested-closure.rs:32:9
38    |
39 LL |         || p.y += incr;
40    |         ^^^^^^^^^^^^^^
41    |
42 note: Min Capture p[(1, 0)] -> MutBorrow
43   --> $DIR/nested-closure.rs:32:12
44    |
45 LL |         || p.y += incr;
46    |            ^^^
47 note: Min Capture incr[] -> ImmBorrow
48   --> $DIR/nested-closure.rs:32:19
49    |
50 LL |         || p.y += incr;
51    |                   ^^^^
52
53 error: First Pass analysis includes:
54   --> $DIR/nested-closure.rs:22:5
55    |
56 LL | /     || {
57 LL | |
58 LL | |
59 LL | |         println!("{}", p.x);
60 ...  |
61 LL | |
62 LL | |     };
63    | |_____^
64    |
65 note: Capturing p[(0, 0)] -> ImmBorrow
66   --> $DIR/nested-closure.rs:25:24
67    |
68 LL |         println!("{}", p.x);
69    |                        ^^^
70 note: Capturing p[(1, 0)] -> MutBorrow
71   --> $DIR/nested-closure.rs:32:12
72    |
73 LL |         || p.y += incr;
74    |            ^^^
75 note: Capturing p[(1, 0)] -> ImmBorrow
76   --> $DIR/nested-closure.rs:42:24
77    |
78 LL |         println!("{}", p.y);
79    |                        ^^^
80
81 error: Min Capture analysis includes:
82   --> $DIR/nested-closure.rs:22:5
83    |
84 LL | /     || {
85 LL | |
86 LL | |
87 LL | |         println!("{}", p.x);
88 ...  |
89 LL | |
90 LL | |     };
91    | |_____^
92    |
93 note: Min Capture p[(0, 0)] -> ImmBorrow
94   --> $DIR/nested-closure.rs:25:24
95    |
96 LL |         println!("{}", p.x);
97    |                        ^^^
98 note: Min Capture p[(1, 0)] -> MutBorrow
99   --> $DIR/nested-closure.rs:32:12
100    |
101 LL |         || p.y += incr;
102    |            ^^^
103
104 error: aborting due to 6 previous errors
105
106 For more information about this error, try `rustc --explain E0658`.