summary refs log tree commit diff
path: root/src/test/ui/nll/issue-52663-span-decl-captured-variable.rs
blob: 24a4267f653f47b86ea4b69777251bb6f4f15353 (plain)
1
2
3
4
5
6
7
8
9
10
11
fn expect_fn<F>(f: F) where F : Fn() {
    f();
}

fn main() {
   {
       let x = (vec![22], vec![44]);
       expect_fn(|| drop(x.0));
       //~^ ERROR cannot move out of captured variable in an `Fn` closure [E0507]
   }
}