// run-pass #![feature(box_syntax)] struct X { a: isize } trait Changer { fn change(self: Box) -> Box; } impl Changer for X { fn change(mut self: Box) -> Box { self.a = 55; self } } pub fn main() { let x: Box<_> = box X { a: 32 }; let new_x = x.change(); assert_eq!(new_x.a, 55); }