Skip to content
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

Fixed semicolon getting moved into trait method comment #4651

Merged
merged 2 commits into from
Jan 18, 2021

Conversation

vallentin
Copy link
Contributor

Fixes #4646

Thought the issue I encountered would be straightforward to fix, so I decided to give it a go.

Fixed by inserting a newline while maintaining current indentation, if the result of rewrite_fn_base ends in a comment.

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.

Thanks! Believe there's an opportunity to simplify this a bit more but please lmk if you think the suggested alternative isn't viable for some reason

src/formatting/items.rs Show resolved Hide resolved
@calebcartwright calebcartwright merged commit d11fde8 into rust-lang:master Jan 18, 2021
@vallentin vallentin deleted the fixes-4646 branch January 18, 2021 07:42
@karyon
Copy link
Contributor

karyon commented Oct 25, 2021

backported in #4674

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.

Rustfmt breaks trait method when where clause is commented out
3 participants