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