- Notifications
You must be signed in to change notification settings - Fork 970
Open
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-ICEP-lowLow priorityLow priorityonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce
Description
Formatting incorrectly
I have this code
pub struct Test { one: i32, two: i32, three_three: i32, four: i32, } impl Test { pub fn new(one: i32, bbb: i32, ccccc: i32, ddddd: i32) -> Self { Self { one: one, two: bbb, three_three: ccccc, four: ddddd, } } }Executing formatting
pub struct Test { one: i32, two: i32, three_three: i32, four: i32, } impl Test { pub fn new(one: i32, bbb: i32, ccccc: i32, ddddd: i32) -> Self { Self { one, two: bbb, three_three: ccccc, four: ddddd, } } }Formatting again
pub struct Test { one: i32, two: i32, three_three: i32, four: i32, } impl Test { pub fn new(one: i32, bbb: i32, ccccc: i32, ddddd: i32) -> Self { Self { one, two: bbb, three_three: ccccc, four: ddddd, } } }When use_field_init_shorthand is in effect,
the struct_field_align_threshold behaves incorrectly.
Version
rustfmt 1.7.0-nightly (0ecbd06 2024-02-25)
Rustfmt Config
struct_field_align_threshold = 30 use_field_init_shorthand = trueMetadata
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-ICEP-lowLow priorityLow priorityonly-with-optionRequires a non-default option value to reproduceRequires a non-default option value to reproduce