-
Notifications
You must be signed in to change notification settings - Fork 971
Closed as not planned
Labels
A-commentsArea: commentsArea: commentsS-duplicateStatus: duplicate of another issue or PRStatus: duplicate of another issue or PR
Description
I am working with with trailing_comma = "Never" set in a rustfmt.toml config, running the nightly rustfmt, and find the following idempotency issue. My understanding is that instead of the following behavior, rustfmt should fully format the code once and not change on future executions.
Starting with the code:
struct Foo {
field1: usize,
field2: usize,
// TODO: maybe we add more fields below
}Calling rustfmt the first time gives
struct Foo {
field1: usize,
field2: usize
// TODO: maybe we add more fields below
}Calling rustfmt the second time gives
struct Foo {
field1: usize,
field2: usize // TODO: maybe we add more fields below
}All subsequent calls leave it in this final state.
My rustfmt version is rustfmt 1.4.37-nightly (8cf990c 2021-05-15)
tv42
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsS-duplicateStatus: duplicate of another issue or PRStatus: duplicate of another issue or PR