rust/tests/run-pass-fullmir/catch.rs
2017-09-16 14:02:59 +02:00

9 lines
180 B
Rust

//ignore-msvc
use std::panic::{catch_unwind, AssertUnwindSafe};
fn main() {
let mut i = 3;
let _ = catch_unwind(AssertUnwindSafe(|| {i -= 2;} ));
println!("{}", i);
}