-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Closed
Copy link
Labels
bugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.good first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wantedonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducep-low
Description
If I have a struct type with an implicit field such as
struct MyStruct(u64);
And I attempt to initialize it to 0
let instance = MyStruct { 0: 0 };
With the option "use_field_init_shorthand = true", rustfmt will incorrectly shorten the initialization to:
let instance = MyStruct { 0 };
This code will no longer compile after running rustfmt.
Metadata
Metadata
Assignees
Labels
bugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.good first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributorshelp wantedonly-with-optionrequires a non-default option value to reproducerequires a non-default option value to reproducep-low