You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, rustfmt would remove one blank, trailing line in a comment
every time it ran, so formatting was not idempotent if a comment had
multiple trailing lines. Comments are only reformatted in this way if
`comment::rewrite_comment_inner` is called, which is enabled by any of the
config options `normalize_comments`, `wrap_comments`, or
`format_code_in_doc_comments` (for doc comments only). Absent those
config options, no trailing line reformatting occurs at all.
In this commit, when the existing condition that detects a blank, trailing
line is true, any preceding blank lines are removed from the reformatted
comment. A source/target "system test" was added to prevent regression.
Signed-off-by: Ross Williams <ross@ross-williams.net>
0 commit comments