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

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