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