1 // This would previously leak the Box<Trait> because we wouldn't
2 // schedule cleanups when auto borrowing trait objects.
3 // This program should be valgrind clean.
5 #![feature(box_syntax)]
7 static mut DROP_RAN: bool = false;
12 unsafe { DROP_RAN = true; }
17 trait Trait { fn dummy(&self) { } }
22 let _x: &Trait = &*(box Foo as Box<Trait>);