Skip to content

Pick up comments between trait where clause and open block #4292

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

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

ayazhafiz
Copy link
Contributor

Previously rustfmt only picked up comments between a trait "signature"
and its block when there was no where clause on the trait. Amending
this to work for comments following a where clause and preceding the
trait block is straightforward; we simply get rid of the branch and
adjust the span to search for a comment in accordingly.

Closes #4289

Previously rustfmt only picked up comments between a trait "signature"
and its block when there was no `where` clause on the trait. Amending
this to work for comments following a `where` clause and preceding the
trait block is straightforward; we simply get rid of the branch and
adjust the span to search for a comment in accordingly.

Closes rust-lang#4289
Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@topecongiro topecongiro merged commit 930d0f7 into rust-lang:master Jun 30, 2020
@vincentisambart
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comment disappearing after last where constraint
5 participants