-
Notifications
You must be signed in to change notification settings - Fork 933
Fixed 'Comment removed between type name and =' issue #4448
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @whizsid! This is a good starting point but we'll need to iterate on it a bit to cover other scenarios. Inline feedback left for your review
@calebcartwright Thank you for the revision. I changed my PR as you suggested. Can you kindly review it again? |
combine_strs_with_missing_comments( | ||
context, | ||
result.trim_end(), | ||
"=", | ||
comment_span, | ||
comment_shape, | ||
true, | ||
)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will want to use the comment_shape
here for comments, but in cases where there's a where clause we don't want to for the assignment operator and the rhs. That's because in cases where the item has a where
clause followed by a block or assignment the block/assignment is not supposed to be indented.
https://github.com/rust-dev-tools/fmt-rfcs/blob/master/guide/items.md#where-clauses
Thank you! |
* Fixed Comment removed between type name and = issue * Fixed where clause issue and pass the full span * has_where condition inline * Fixed indentation error on where clause * Removed tmp file
* Fixed Comment removed between type name and = issue * Fixed where clause issue and pass the full span * has_where condition inline * Fixed indentation error on where clause * Removed tmp file
Backported in #4564 |
Fixes #4244 .