]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/pass/closure-field-ty.rs
Auto merge of #104915 - weihanglo:update-cargo, r=ehuss
[rust.git] / src / tools / miri / tests / pass / closure-field-ty.rs
1 // miri issue #304
2 fn main() {
3     let mut y = 0;
4     {
5         let mut box_maybe_closure = Box::new(None);
6         *box_maybe_closure = Some(|| y += 1);
7         (box_maybe_closure.unwrap())();
8     }
9     assert_eq!(y, 1);
10 }