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