rust/tests/run-pass-fullmir/catch.rs
2018-05-11 11:29:18 +02:00

10 lines
195 B
Rust

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