2 #![allow(unused_variables)]
3 struct Foo<'r>(&'r mut i32);
5 impl<'r> Drop for Foo<'r> {
12 impl<'r> Trait for Foo<'r> {}
14 struct Holder<T: ?Sized>(T);
20 let y = &Holder([Foo(&mut drops)]) as &Holder<[Foo]>;
21 // this used to cause an extra drop of the Foo instance
28 let y = &Holder(Foo(&mut drops)) as &Holder<dyn Trait>;
29 // this used to cause an extra drop of the Foo instance