Constant patterns are mistaken for variable binding
yvt opened this issue · comments
https://docs.rs/syn/2.0.15/syn/struct.PatIdent.html
A pattern that binds a new variable:
ref mut binding @ SUBPATTERN
.It may also be a unit struct or struct variant (e.g.
None
), or a constant; these cannot be distinguished syntactically.