1 // FIXME(arora-aman) add run-pass once 2229 is implemented
3 #![feature(capture_disjoint_fields)]
4 //~^ WARNING: the feature `capture_disjoint_fields` is incomplete
5 //~| NOTE: `#[warn(incomplete_features)]` on by default
6 //~| NOTE: see issue #53488 <https://github.com/rust-lang/rust/issues/53488>
7 #![feature(rustc_attrs)]
15 let mut p = Point { x: 10, y: 10 };
17 let c = #[rustc_capture_analysis]
18 //~^ ERROR: attributes on expressions are experimental
19 //~| NOTE: see issue #15701 <https://github.com/rust-lang/rust/issues/15701>
21 //~^ First Pass analysis includes:
22 //~| Min Capture analysis includes:
24 //~^ NOTE: Capturing p[(0, 0)] -> ImmBorrow
25 //~| NOTE: Min Capture p[(0, 0)] -> ImmBorrow
28 // `c` should only capture `p.x`, therefore mutating `p.y` is allowed.