Borrow checker doesn't realize borrow ends in both branches #57956
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code fails to compile, even though there are no outstanding references to
procs
after theif let
:with
If the
if let
is replace with an equivalentmap
on the other hand, the code compiles just fine:This could be related to #47680 or #57165, I'm not sure. Happens on both 2015 and 2018 editions.
The text was updated successfully, but these errors were encountered: