rust/src/test/ui/nll/issue-55850.stderr

18 lines
545 B
Plaintext
Raw Normal View History

error[E0597]: `s` does not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/issue-55850.rs:28:16
|
2019-03-09 06:03:44 -06:00
LL | yield &s[..]
| ^ borrowed value does not live long enough
LL | })
| - borrowed value only lives until here
|
2018-12-25 09:56:47 -06:00
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 25:8...
--> $DIR/issue-55850.rs:25:8
|
LL | fn bug<'a>() -> impl Iterator<Item = &'a str> {
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.