2017-09-16 06:32:38 -05:00
|
|
|
//ignore-msvc
|
2017-07-19 08:06:21 -05:00
|
|
|
//ignore-macos
|
2017-05-26 19:27:39 -05:00
|
|
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut i = 3;
|
|
|
|
let _ = catch_unwind(AssertUnwindSafe(|| {i -= 2;} ));
|
2017-09-16 05:36:28 -05:00
|
|
|
println!("{}", i);
|
2017-05-26 19:27:39 -05:00
|
|
|
}
|