#![feature(box_syntax)] struct DroppableStruct; static mut DROPPED: bool = false; impl Drop for DroppableStruct { fn drop(&mut self) { unsafe { DROPPED = true; } } } trait MyTrait { fn dummy(&self) { } } impl MyTrait for Box {} #[allow(dead_code)] struct Whatever { w: Box } impl Whatever { fn new(w: Box) -> Whatever { Whatever { w: w } } } fn main() { { let f: Box<_> = box DroppableStruct; let _a = Whatever::new(box f as Box); } assert!(unsafe { DROPPED }); }