summaryrefslogtreecommitdiffstats
path: root/src/test/ui/borrowck/borrowck-move-by-capture-ok.rs
blob: e7a48ebf6ca9b0cd001dc50f2e84740e24e43b27 (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);
}