fork/rust

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

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

1.43.0
431 B14 linesraw
1error[E0521]: borrowed data escapes outside of generator
2  --> $DIR/ref-escapes-but-not-over-yield.rs:11:9
3   |
4LL |     let mut a = &3;
5   |         ----- `a` declared here, outside of the generator body
6...
7LL |         a = &b;
8   |         ^^^^--
9   |         |   |
10   |         |   borrow is only valid in the generator body
11   |         reference to `b` escapes the generator body here
12
13error: aborting due to previous error
14