Sign in
fuchsia
/
third_party
/
rust
/
9d09331e00b02f81c714b0c41ce3a38380dd36a2
/
.
/
src
/
test
/
ui
/
panics
/
panic-set-unset-handler.rs
blob: dde0c72f76550bcb999ff43ead8d6c42750e741d [
file
] [
log
] [
blame
]
// run-fail
// error-pattern:thread 'main' panicked at 'foobar'
// ignore-emscripten no processes
use
std
::
panic
;
fn
main
()
{
panic
::
set_hook
(
Box
::
new
(|
i
|
{
eprint
!(
"greetings from the panic handler"
);
}));
panic
::
take_hook
();
panic
!(
"foobar"
);
}