NLL no longer figures out non-lexical lifetimes within loop #51526
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
NLL-polonius
Issues related for using Polonius in the borrow checker
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Minimal useful example:
This program compiled in
nightly-2018-03-07
, but does not compile onnightly-2018-05-27
. Instead, it fails with this error:(playground)
To my understanding, this program is in fact sane.
next
is always dropped by the timequeue.pop_front()
runs, and if it escapes and is returned,queue.pop_front()
is not run.The error is the same if
return Some(next);
is used instead ofbreak next;
.The text was updated successfully, but these errors were encountered: