Rustfmt deletes comments in trait declarations #4672
Labels
1x-backport:pending
Fixed/resolved in source but not yet backported to a 1x branch and release
a-comments
bug
Panic, non-idempotency, invalid code, etc.
Describe the bug
I have the following piece of code:
Which rustfmt reformats to:
Deleting the comment
To Reproduce
Run
cargo fmt
with the first code block results in the second code blockExpected behavior
The comment should not be deleted
Meta
rustfmt 1.4.25-stable
. Reddit user u/m0rphism also reports it can be reproduced withrustfmt 1.4.9-nightly
rustup
cargo fmt
& from vscodeThe text was updated successfully, but these errors were encountered: