fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
517 B16 linesraw
1error[E0505]: cannot move out of `x` because it is borrowed
2  --> $DIR/issue-6801.rs:19:13
3   |
4LL |       let sq =  || { *x * *x };
5   |                 --    - borrow occurs due to use in closure
6   |                 |
7   |                 borrow of `x` occurs here
8LL | 
9LL |       twice(x);
10   |             ^ move out of `x` occurs here
11LL |       invoke(sq);
12   |              -- borrow later used here
13
14error: aborting due to previous error
15
16For more information about this error, try `rustc --explain E0505`.