Possible E0301 false positive #59803
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
This code fails with
error[E0301]: cannot mutably borrow in a pattern guard
:Error
However the following works:
Which is rather surprising and looks like a false positive to me. Could the compiler allow a match if the lifetime of the mutable borrow is limited to the match guard ?
The text was updated successfully, but these errors were encountered: