Skip to content

Support comments in trait bounds #5059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ulyssa
Copy link
Contributor

@ulyssa ulyssa commented Nov 2, 2021

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 27d5871 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.

@calebcartwright
Copy link
Member

And here I was thinking that splitting it up would make for smaller/simpler PRs 😁

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-medium pr-merge-conflict This PR has merge conflicts that must be resolved pr-waiting-on-author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trait bounds with comments are not formatted
3 participants