Sign in
fuchsia
/
third_party
/
rust
/
a5a7ed63488ebc6d7b1af575972f1f81136b1a72
/
.
/
src
/
test
/
run-fail
/
panic-set-handler.rs
blob: ea2b152c6c45acda10a9e08171a7dd2f83729e1a [
file
] [
log
] [
blame
]
// error-pattern:greetings from the panic handler
use
std
::
panic
;
fn
main
()
{
panic
::
set_hook
(
Box
::
new
(|
i
|
{
eprintln
!(
"greetings from the panic handler"
);
}));
panic
!(
"foobar"
);
}