2018-08-30 08:57:17 -05:00
|
|
|
//ignore-msvc: Stdout not implemented on Windows
|
2017-05-26 19:27:39 -05:00
|
|
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut i = 3;
|
2018-11-26 08:31:53 -06:00
|
|
|
let _val = catch_unwind(AssertUnwindSafe(|| {i -= 2;} ));
|
2017-09-16 05:36:28 -05:00
|
|
|
println!("{}", i);
|
2017-05-26 19:27:39 -05:00
|
|
|
}
|