mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03:00
9 lines
218 B
Rust
9 lines
218 B
Rust
//ignore-msvc: Stdout not implemented on Windows
|
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
|
|
|
fn main() {
|
|
let mut i = 3;
|
|
let _val = catch_unwind(AssertUnwindSafe(|| {i -= 2;} ));
|
|
println!("{}", i);
|
|
}
|