]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/2229_closure_analysis/arrays-completely-captured.stderr
Rollup merge of #107190 - fmease:fix-81698, r=compiler-errors
[rust.git] / tests / ui / closures / 2229_closure_analysis / arrays-completely-captured.stderr
1 error[E0658]: attributes on expressions are experimental
2   --> $DIR/arrays-completely-captured.rs:8:17
3    |
4 LL |     let mut 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/arrays-completely-captured.rs:11:5
12    |
13 LL | /     || {
14 LL | |
15 LL | |
16 LL | |         m[0] += 10;
17 ...  |
18 LL | |
19 LL | |     };
20    | |_____^
21    |
22 note: Capturing m[] -> MutBorrow
23   --> $DIR/arrays-completely-captured.rs:14:9
24    |
25 LL |         m[0] += 10;
26    |         ^
27 note: Capturing m[] -> MutBorrow
28   --> $DIR/arrays-completely-captured.rs:17:9
29    |
30 LL |         m[1] += 40;
31    |         ^
32
33 error: Min Capture analysis includes:
34   --> $DIR/arrays-completely-captured.rs:11:5
35    |
36 LL | /     || {
37 LL | |
38 LL | |
39 LL | |         m[0] += 10;
40 ...  |
41 LL | |
42 LL | |     };
43    | |_____^
44    |
45 note: Min Capture m[] -> MutBorrow
46   --> $DIR/arrays-completely-captured.rs:14:9
47    |
48 LL |         m[0] += 10;
49    |         ^
50
51 error: aborting due to 3 previous errors
52
53 For more information about this error, try `rustc --explain E0658`.