// Tests that the borrow checker checks all components of a path when moving // out. #![feature(box_syntax)] struct S { x : Box } fn f(_: T) {} fn main() { let a : S = S { x : box 1 }; let pb = &a; let S { x: ax } = a; //~ ERROR cannot move out f(pb); }