Fixed 'Comment removed between type name and =' issue#4448
Fixed 'Comment removed between type name and =' issue#4448calebcartwright merged 5 commits intorust-lang:masterfrom
Conversation
calebcartwright
left a comment
There was a problem hiding this comment.
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.
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 .