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)]
17 let mut w = Wrapper { p: Point { x: 10, y: 10 } };
19 let c = #[rustc_capture_analysis]
20 //~^ ERROR: attributes on expressions are experimental
22 println!("{}", w.p.x);
25 // `c` only captures `w.p.x`, therefore it's safe to mutate `w.p.y`.