Sign in
rust
/
rust
/
refs/heads/lcnr/rustc-dev-guide
/
.
/
src
/
tools
/
miri
/
tests
/
pass
/
catch.rs
blob: bedabf3eb286a6c6ac4f91a036a798977b70dffd [
file
] [
log
] [
blame
] [
edit
]
use
std
::
panic
::{
AssertUnwindSafe
,
catch_unwind
};
fn
main
()
{
let
mut
i
=
3
;
let
_val
=
catch_unwind
(
AssertUnwindSafe
(||
i
-=
2
));
println
!(
"{}"
,
i
);
}