rustfmt
rustfmt copied to clipboard
Support comments in trait bounds
I've split out the portion of #5004 that fixes #2055 into its own PR.
I took a look at #4666 and found a case that it handled that wasn't in my original PR (handling comments before the trait identifier). I've updated the code and tests to include that.
It was also suggested over there that I take a look at the rustfmt-2.0.0-rc.2 for anything that might be related. The changes made in 27d5871700063f87f178c08ba7eccb611ee7ef45 are the closest I came across. If it seems appropriate, I can update this PR to include the changes in that commit modified to switch onVersion::Two.
And here I was thinking that splitting it up would make for smaller/simpler PRs :grin:
I've taken a very cursory pass through this and think I follow your line of thinking around the solution. Will want to let it digest a bit and take a couple more passes through it, but I do have two smaller asks for now:
- Could you rebase and resolve the merge conflicts whenever you get a chance? The conflicts don't seem too terribly gnarly
- Could you add some more tests that include:
- nested items
- line/slash style comments
- multiple/consecutive line/slash style comments
- multiline block style comments