-
Notifications
You must be signed in to change notification settings - Fork 960
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-ICE
Description
Describe the bug
rustfmt drops block associated with a foreign function
To Reproduce
Formatting
extern "C" {
fn f() {
fn g() {}
}
}gives
extern "C" {
fn f();
}Context: rust-lang/rust#74204
Expected behavior
The formatting makes the code semantically correct, but causes a loss of information. I think rustfmt should preserve the block, if it has access to it.
Meta
- rustfmt version: 37ec56d
- From where did you install rustfmt?: from source
- How do you run rustfmt: binary from source
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-ICE