summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-10398.rs
blob: 0405b2d01e2cc75949ffafc8d7ff2765388eb33b (plain)
1
2
3
4
5
6
7
8
9
10
11
#![feature(box_syntax)]

fn main() {
    let x: Box<_> = box 1;
    let f = move|| {
        let _a = x;
        drop(x);
        //~^ ERROR: use of moved value: `x`
    };
    f();
}