about summary refs log tree commit diff
path: root/tests/ui/borrowck/borrowck-move-by-capture-ok.rs
blob: b466654814d0ee445fd8dcdc97b5c6a3934f60b2 (plain)
1
2
3
4
5
6
7
//@ run-pass

pub fn main() {
    let bar: Box<_> = Box::new(3);
    let h = || -> isize { *bar };
    assert_eq!(h(), 3);
}