summaryrefslogtreecommitdiffstats
path: root/src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.rs
blob: 76b7aab542de8313d351541b229dbe5b127311c5 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(unboxed_closures)]

fn to_fn<A,F:Fn<A>>(f: F) -> F { f }

fn test(_x: Box<usize>) {}

fn main() {
    let i = Box::new(3);
    let _f = to_fn(|| test(i)); //~ ERROR cannot move out
}