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