X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Ftest%2Fui%2Fnll%2Fissue-55850.rs;h=a8f7299f89937a29898d7fd31052cec7de32bf22;hb=59724084089da63cc2f982372c0fae3551d85fe5;hp=8b5887224d19ae862c831b1f9afe45e80c6701df;hpb=064b787fc9c5074077d20d50387b91d12fc1e277;p=rust.git diff --git a/src/test/ui/nll/issue-55850.rs b/src/test/ui/nll/issue-55850.rs index 8b5887224d1..a8f7299f899 100644 --- a/src/test/ui/nll/issue-55850.rs +++ b/src/test/ui/nll/issue-55850.rs @@ -25,7 +25,8 @@ fn next(&mut self) -> Option { fn bug<'a>() -> impl Iterator { 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 }) }