]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/issue-55850.stderr
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / nll / issue-55850.stderr
1 error[E0515]: cannot yield value referencing local variable `s`
2   --> $DIR/issue-55850.rs:28:9
3    |
4 LL |         yield &s[..]
5    |         ^^^^^^^-^^^^
6    |         |      |
7    |         |      `s` is borrowed here
8    |         yields a value referencing data owned by the current function
9
10 error[E0626]: borrow may still be in use when generator yields
11   --> $DIR/issue-55850.rs:28:16
12    |
13 LL |         yield &s[..]
14    |         -------^---- possible yield occurs here
15
16 error: aborting due to 2 previous errors
17
18 Some errors have detailed explanations: E0515, E0626.
19 For more information about an error, try `rustc --explain E0515`.