]> git.lizzy.rs Git - rust.git/blob - src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.rs
5fcd3392d33e379b11f649076bc58fa2356de487
[rust.git] / src / test / ui / moves / moves-based-on-type-move-out-of-closure-env-issue-1965.rs
1 #![feature(box_syntax, unboxed_closures)]
2
3 use std::usize;
4
5 fn to_fn<A,F:Fn<A>>(f: F) -> F { f }
6
7 fn test(_x: Box<usize>) {}
8
9 fn main() {
10     let i = box 3;
11     let _f = to_fn(|| test(i)); //~ ERROR cannot move out
12 }