-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Description
Describe the bug
When rustfmt deletes an unnecessary semicolon, it also deletes comments immediately before that semicolon.
Obviously this isn't a common scenario, but rustfmt should never delete comments.
To Reproduce
Expected behavior
The extraneous semicolon should be deleted but the comment should remain.
Meta
- rustfmt version: 1.4.20-nightly (2020-08-09 48f6c32)
- From where did you install rustfmt?: Rust Playground (also rustup)
- How do you run rustfmt: Rust Playground (also
cargo fmt
)