Closed
Description
Describe the bug
When a normal comment (non-doc-comment) is applied to an item in an extern
block, rustfmt
will delete it.
To Reproduce
The following code:
extern "C" {
// A comment
fn bar();
}
is formatted as:
extern "C" {
fn bar();
}
Expected behavior
rustfmt
should leave the comment intact
Meta
- rustfmt version: rustfmt 1.4.26-nightly (293d7d0 2020-11-14)
- From where did you install rustfmt?: rustup
- How do you run rustfmt:
rustfmt