Borrowing an immutable reference of a mutable reference through a function call in a loop is not accepted #51132
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-lang
Relevant to the language team, which will review and decide on the PR/issue.
This code appears to be sound because
event
should either leave the loop or be thrown away before the next iteration:The current (1.28.0-nightly 2018-05-25 990d8aa) implementation still marks this as an error:
@nikomatsakis said:
The text was updated successfully, but these errors were encountered: