1 error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function
2 --> $DIR/issue-4335.rs:16:17
4 LL | id(Box::new(|| *v))
5 | ^^ - `v` is borrowed here
7 | may outlive borrowed value `v`
8 help: to force the closure to take ownership of `v` (and any other referenced variables), use the `move` keyword
10 LL | id(Box::new(move || *v))
13 error[E0507]: cannot move out of borrowed content
14 --> $DIR/issue-4335.rs:16:20
16 LL | id(Box::new(|| *v))
17 | ^^ cannot move out of borrowed content
19 error: aborting due to 2 previous errors
21 Some errors occurred: E0373, E0507.
22 For more information about an error, try `rustc --explain E0373`.