]>
Commit | Line | Data |
---|---|---|
5869c6ff XL |
1 | #![feature(capture_disjoint_fields)] |
2 | //~^ WARNING: the feature `capture_disjoint_fields` is incomplete | |
3 | //~| `#[warn(incomplete_features)]` on by default | |
4 | //~| see issue #53488 <https://github.com/rust-lang/rust/issues/53488> | |
5 | ||
6 | // Check that precise paths are being reported back in the error message. | |
7 | ||
8 | enum SingleVariant { | |
9 | Point(i32, i32), | |
10 | } | |
11 | ||
12 | fn main() { | |
13 | let mut point = SingleVariant::Point(10, -10); | |
14 | ||
15 | let c = || { | |
6a06907d XL |
16 | let SingleVariant::Point(ref mut x, _) = point; |
17 | *x += 1; | |
5869c6ff XL |
18 | }; |
19 | ||
20 | let b = c; | |
21 | let a = c; //~ ERROR use of moved value: `c` [E0382] | |
22 | } |