-
Notifications
You must be signed in to change notification settings - Fork 936
Closed
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releasea-commentsbugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.
Description
Describe the bug
There's a weird interaction between comments and commas in struct declarations that leads to duplication of commas and breaking the syntax of the formatted code (error: expected identifier, found ','
)
To Reproduce
Input:
struct Something {
field: u32/*a*/,/*b*/
}
Formatting result:
struct Something {
field: u32, /*a*/,/*b*/
}
Expected behavior
Do not duplicate commas.
Meta
- rustfmt version: 1.4.36-nightly (2021-02-07 7de6968)
- From where did you install rustfmt?: playground
- How do you run rustfmt: playground
Metadata
Metadata
Assignees
Labels
1x-backport:pendingFixed/resolved in source but not yet backported to a 1x branch and releaseFixed/resolved in source but not yet backported to a 1x branch and releasea-commentsbugPanic, non-idempotency, invalid code, etc.Panic, non-idempotency, invalid code, etc.