Open QuarticCat opened 4 months ago
There is trailing whitespace in the input snippet. The comment // 114514
prevents formatting, which also stops rustfmt from rewriting the assignment and removing the whitespace.
@rustbot claim
@ytmimi
I managed to find a fix for this scenario by applying rewrite_assign_rhs_with_comments
.
The problem is rewrite_assign_rhs_with_comments seems to work different when the line is super long. Would appreciate some pointers
Closing my PR as https://github.com/rust-lang/rustfmt/pull/5501/files is addressing the same issue
Minimum reproducible example:
Note the extra whitespace after
=
.Version: 1.7.0-stable