3 // Test that we do not leak when the arg pattern must drop part of the
4 // argument (in this case, the `y` field).
6 #![feature(box_syntax)]
13 fn foo(Foo {x, ..}: Foo) -> *const usize {
14 let addr: *const usize = &*x;
19 let obj: Box<_> = box 1;
20 let objptr: *const usize = &*obj;
21 let f = Foo {x: obj, y: box 2};
23 assert_eq!(objptr, xptr);