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