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 #![feature(rustc_attrs)]
13 let mut p = Point { x: 10, y: 10 };
15 let c = #[rustc_capture_analysis]
16 //~^ ERROR: attributes on expressions are experimental
19 //~^ ERROR: Capturing p[(0, 0)] -> ImmBorrow
20 //~^^ ERROR: Min Capture p[(0, 0)] -> ImmBorrow
23 // `c` should only capture `p.x`, therefore mutating `p.y` is allowed.