fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0507]: cannot move out of `val`, a captured variable in an `FnMut` closure 2 --> $DIR/issue-87456-point-to-closure.rs:10:28 3 | 4LL | let val = String::new(); 5 | --- captured outer variable 6LL | 7LL | take_mut(|| { 8 | -- captured by this `FnMut` closure 9LL | 10LL | let _foo: String = val; 11 | ^^^ move occurs because `val` has type `String`, which does not implement the `Copy` trait 12 | 13help: consider borrowing here 14 | 15LL | let _foo: String = &val; 16 | + 17 18error: aborting due to previous error 19 20For more information about this error, try `rustc --explain E0507`.