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