#![feature(unboxed_closures, tuple_trait)] fn to_fn>(f: F) -> F { f } fn test(_x: Box) {} fn main() { let i = Box::new(3); let _f = to_fn(|| test(i)); //~ ERROR cannot move out }