#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::panic::{self, AssertUnwindSafe}; fn main() { let mut variable = 4; let other_capture = 3; let result = { let mut wrapper = AssertUnwindSafe(&mut variable); panic::catch_unwind(move || { **wrapper += other_capture; }) }; }