rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Support comments in trait bounds

Open ulyssa opened this issue 4 years ago • 1 comments

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.

ulyssa avatar Nov 02 '21 00:11 ulyssa

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

calebcartwright avatar Nov 23 '21 23:11 calebcartwright