summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/issue-10398.rs
blob: f76d09cd0b2ae60c1cf496a1ca58061a8cf2a148 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    let x: Box<_> = Box::new(1);
    let f = move|| {
        let _a = x;
        drop(x);
        //~^ ERROR: use of moved value: `x`
    };
    f();
}