fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
678 B20 linesraw
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`.