fork/rust

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

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

1.43.0
633 B19 linesraw
1error[E0515]: cannot yield value referencing local variable `s`
2  --> $DIR/issue-55850.rs:28:9
3   |
4LL |         yield &s[..]
5   |         ^^^^^^^-^^^^
6   |         |      |
7   |         |      `s` is borrowed here
8   |         yields a value referencing data owned by the current function
9
10error[E0626]: borrow may still be in use when generator yields
11  --> $DIR/issue-55850.rs:28:16
12   |
13LL |         yield &s[..]
14   |         -------^---- possible yield occurs here
15
16error: aborting due to 2 previous errors
17
18Some errors have detailed explanations: E0515, E0626.
19For more information about an error, try `rustc --explain E0515`.