]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/nll/issue-55850.rs
Rollup merge of #60685 - dtolnay:spdx, r=nikomatsakis
[rust.git] / src / test / ui / nll / issue-55850.rs
index 8b5887224d19ae862c831b1f9afe45e80c6701df..a8f7299f89937a29898d7fd31052cec7de32bf22 100644 (file)
@@ -25,7 +25,8 @@ fn next(&mut self) -> Option<Self::Item> {
 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
     })
 }