]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-52663-span-decl-captured-variable.rs
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / nll / issue-52663-span-decl-captured-variable.rs
1 fn expect_fn<F>(f: F) where F : Fn() {
2     f();
3 }
4
5 fn main() {
6    {
7        let x = (vec![22], vec![44]);
8        expect_fn(|| drop(x.0));
9        //~^ ERROR cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure [E0507]
10    }
11 }