]>
Commit | Line | Data |
---|---|---|
fc512014 | 1 | error[E0658]: attributes on expressions are experimental |
136023e0 | 2 | --> $DIR/simple-struct-min-capture.rs:23:17 |
fc512014 XL |
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 | ||
fc512014 | 10 | error: First Pass analysis includes: |
136023e0 | 11 | --> $DIR/simple-struct-min-capture.rs:26:5 |
fc512014 XL |
12 | | |
13 | LL | / || { | |
14 | LL | | | |
15 | LL | | | |
16 | LL | | p.x += 10; | |
17 | ... | | |
18 | LL | | | |
19 | LL | | }; | |
20 | | |_____^ | |
21 | | | |
22 | note: Capturing p[(0, 0)] -> MutBorrow | |
136023e0 | 23 | --> $DIR/simple-struct-min-capture.rs:29:9 |
fc512014 XL |
24 | | |
25 | LL | p.x += 10; | |
26 | | ^^^ | |
27 | note: Capturing p[] -> ImmBorrow | |
136023e0 | 28 | --> $DIR/simple-struct-min-capture.rs:32:26 |
fc512014 XL |
29 | | |
30 | LL | println!("{:?}", p); | |
31 | | ^ | |
32 | ||
33 | error: Min Capture analysis includes: | |
136023e0 | 34 | --> $DIR/simple-struct-min-capture.rs:26:5 |
fc512014 XL |
35 | | |
36 | LL | / || { | |
37 | LL | | | |
38 | LL | | | |
39 | LL | | p.x += 10; | |
40 | ... | | |
41 | LL | | | |
42 | LL | | }; | |
43 | | |_____^ | |
44 | | | |
45 | note: Min Capture p[] -> MutBorrow | |
136023e0 | 46 | --> $DIR/simple-struct-min-capture.rs:29:9 |
fc512014 XL |
47 | | |
48 | LL | p.x += 10; | |
5869c6ff XL |
49 | | ^^^ p[] captured as MutBorrow here |
50 | ... | |
51 | LL | println!("{:?}", p); | |
52 | | ^ p[] used here | |
fc512014 | 53 | |
136023e0 | 54 | error: aborting due to 3 previous errors |
fc512014 XL |
55 | |
56 | For more information about this error, try `rustc --explain E0658`. |