9 struct NoisyDrop<'a>(&'a Cell<&'static str>);
10 impl<'a> Drop for NoisyDrop<'a> {
12 self.0.set("destroyed");
16 #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
18 let status = Cell::new("alive");
20 let _y: Box<NoisyDrop>;
21 let x = Box::new(NoisyDrop(&status));
23 asm!("mov $1, $0" : "=r"(_y) : "r"(x));
25 assert_eq!(status.get(), "alive");
27 assert_eq!(status.get(), "destroyed");
30 #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]