]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-4335.stderr
Rollup merge of #86479 - exphp-forks:float-debug-exponential, r=yaahc
[rust.git] / src / test / ui / issues / issue-4335.stderr
1 error[E0507]: cannot move out of `*v`, as `v` is a captured variable in an `FnMut` closure
2   --> $DIR/issue-4335.rs:6:20
3    |
4 LL | fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> {
5    |             - captured outer variable
6 LL |     id(Box::new(|| *v))
7    |                 ---^^
8    |                 |  |
9    |                 |  move occurs because `*v` has type `T`, which does not implement the `Copy` trait
10    |                 captured by this `FnMut` closure
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0507`.