blob: db4d8a4dd1e0f57e0a08692d9c0262263430bdc6 [file] [edit]
// Checks what happens when panicking inside the panic hook.
//@ run-crash
//@ exec-env:RUST_BACKTRACE=0
//@ check-run-results
//@ error-pattern: panicked while processing panic
//@ ignore-emscripten "RuntimeError" junk in output
use std::panic;
fn main() {
panic::set_hook(Box::new(|_| panic!("panic in hook")));
panic!();
}