fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
555 B17 linesraw
1error[E0382]: use of moved value: `x`
2  --> $DIR/issue-24357.rs:8:12
3   |
4LL |    let x = NoCopy;
5   |        - move occurs because `x` has type `NoCopy`, which does not implement the `Copy` trait
6LL |
7LL |    let f = move || { let y = x; };
8   |            -------           - variable moved due to use in closure
9   |            |
10   |            value moved into closure here
11...
12LL |    let z = x;
13   |            ^ value used here after move
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0382`.