// run-pass #![allow(non_camel_case_types)] trait double { fn double(self: Box) -> usize; } impl double for usize { fn double(self: Box) -> usize { *self * 2 } } pub fn main() { let x: Box<_> = Box::new(Box::new(3usize) as Box); assert_eq!(x.double(), 6); }