-
Notifications
You must be signed in to change notification settings - Fork 975
Closed
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICES-duplicateStatus: duplicate of another issue or PRStatus: duplicate of another issue or PR
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICECategory: this is a bug; use also I-* labels for specific bug kinds, e.g. I-non-idempotency or I-ICES-duplicateStatus: duplicate of another issue or PRStatus: duplicate of another issue or PR