]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | error[E0507]: cannot move out of `*v`, as `v` is a captured variable in an `FnMut` closure |
48663c56 XL |
2 | --> $DIR/issue-4335.rs:6:20 |
3 | | | |
dc9dc135 | 4 | LL | fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> { |
48663c56 XL |
5 | | - captured outer variable |
6 | LL | id(Box::new(|| *v)) | |
c295e0f8 XL |
7 | | ---^^ |
8 | | | | | |
9 | | | move occurs because `*v` has type `T`, which does not implement the `Copy` trait | |
10 | | captured by this `FnMut` closure | |
48663c56 | 11 | |
60c5eb7d | 12 | error: aborting due to previous error |
ff7c6d11 | 13 | |
60c5eb7d | 14 | For more information about this error, try `rustc --explain E0507`. |