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