Too conservative lifetime check in match arm with if condition. #137878
Labels
A-lifetimes
Area: Lifetimes / regions
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The above two examples are similar, but compilation can succeed only for the first, while the second one has the following error:
But the exclusive reference in
Some(_)
is indeed never used and this specific case at least should be acceptable. I think this is something related to non-lexical lifetime, yet it's a quite simple case to implement or correct in the lifetime checker.The text was updated successfully, but these errors were encountered: