summary refs log tree commit diff
path: root/src/tools/miri/tests/pass/catch.rs
blob: 4ede23e68ce253eeab844e4397a10e0f51662760 (plain)
1
2
3
4
5
6
7
use std::panic::{catch_unwind, AssertUnwindSafe};

fn main() {
    let mut i = 3;
    let _val = catch_unwind(AssertUnwindSafe(|| i -= 2));
    println!("{}", i);
}