rust/tests/ui/panic-runtime/auxiliary/exit-success-if-unwind.rs
2024-02-16 20:02:50 +00:00

17 lines
203 B
Rust

//@ no-prefer-dynamic
#![crate_type = "rlib"]
struct Bomb;
impl Drop for Bomb {
fn drop(&mut self) {
std::process::exit(0);
}
}
pub fn bar(f: fn()) {
let _bomb = Bomb;
f();
}