-
Notifications
You must be signed in to change notification settings - Fork 975
Closed
Labels
2x-port:pendingC-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
As of current master, rustfmt applies the following incorrect diff to this valid Rust code.
#[cfg(any())]
trait Visible {
- pub const C: i32;
+ const C: i32;
pub type T;
- pub fn f();
+ fn f();
- pub fn g() {}
+ fn g() {}
}
#[cfg(any())]
impl Visible for Bar {
pub const C: i32;
pub type T;
- pub fn f();
+ fn f();
pub fn g() {}
}To reproduce: cargo run --bin rustfmt repro.rs
Metadata
Metadata
Assignees
Labels
2x-port:pendingC-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