]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-by-capture-ok.rs
Auto merge of #102460 - flba-eb:fix_85261_prevent_alloc_after_fork, r=thomcc
[rust.git] / src / test / ui / borrowck / borrowck-move-by-capture-ok.rs
1 // run-pass
2
3 pub fn main() {
4     let bar: Box<_> = Box::new(3);
5     let h = || -> isize { *bar };
6     assert_eq!(h(), 3);
7 }