]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-by-capture-ok.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }