Sign in
fuchsia
/
third_party
/
rust
/
11a0b968c287c81680387ffcf112328d52d7e815
/
.
/
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"
);
}