3 // Test that we do not leak when the arg pattern must drop part of the
4 // argument (in this case, the `y` field).
11 fn foo(Foo {x, ..}: Foo) -> *const usize {
12 let addr: *const usize = &*x;
17 let obj: Box<_> = Box::new(1);
18 let objptr: *const usize = &*obj;
19 let f = Foo { x: obj, y: Box::new(2) };
21 assert_eq!(objptr, xptr);