2 // Test invoked `&self` methods on owned objects where the values
3 // closed over contain managed values. This implies that the boxes
4 // will have headers that must be skipped over.
7 fn foo(self: Box<Self>) -> usize;
14 impl FooTrait for BarStruct {
15 fn foo(self: Box<BarStruct>) -> usize {
21 let foo = Box::new(BarStruct{ x: 22 }) as Box<dyn FooTrait>;
22 assert_eq!(22, foo.foo());