You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for reaching out. Confirming I can reproduce this using rustfmt 1.5.2-nightly (34f9ca28 2023-02-16). I also believe your assumption about this being parsed as a closure is correct.
The issue here is that rustfmt doesn't currently have any special case handling for the matches! macro, however I just looked into it and I believe #5554 would resolve this issue. I've updated the PR to include a test case for this issue.
When formatting this code:
It is written like that:
I think that rustfmt sees it as a closure.
I tried to reproduce with a simpler example, but it doesn't work. I think it comes from diverse things, like the fact there is a tuple.
The text was updated successfully, but these errors were encountered: