fn bug<'a>() -> impl Iterator<Item = &'a str> {
GenIter(move || {
let mut s = String::new();
- yield &s[..] //~ ERROR `s` does not live long enough [E0597]
+ yield &s[..] //~ ERROR cannot yield value referencing local variable `s` [E0515]
//~| ERROR borrow may still be in use when generator yields
})
}