]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-4335.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-4335.stderr
CommitLineData
dc9dc135 1error[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 4LL | fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> {
48663c56
XL
5 | - captured outer variable
6LL | 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 12error: aborting due to previous error
ff7c6d11 13
60c5eb7d 14For more information about this error, try `rustc --explain E0507`.