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