Open WaffleLapkin opened 2 years ago
Thanks for the report!
Seems like this could be related to #4631 as both deal with dropping tokens in macro calls.
EDIT: upon further investigation these issues don't seem to be related. #4631 deals more with adding tokens to macro calls. specifically adding commas ,
.
I wonder if the advice from https://github.com/rust-lang/rustfmt/issues/4631#issuecomment-760640022 would help? I know that rustfmt doesn't typically format macros that use {}
.
Doing some testing and it seems like #5301 will fix some of the examples you outlined, but the first case a!(for<> A);
is still an issue even after testing this snippet on that branch.
I believe all but the first issue were resolved by #5848. @compiler-errors do you have any interest in digging into the empty for<>
case?
Given this input:
rustfmt produces the following output:
Which is incorrect since macros can depend on the
for<...>
. (playground)