-
Notifications
You must be signed in to change notification settings - Fork 974
Closed
Labels
A-2024-style-editionArea: style edition 2024Area: style edition 2024A-configArea: configurationArea: configurationgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributors
Description
If I run cargo fmt on my project that targets the 2024 edition, it formats it correctly. If I just run rustfmt on a file, it targets the 2021 edition by default. To be consistent with cargo fmt I have to run rustfmt --edition 2024 <file>.
Is this discrepancy intended?
I noticed this because my editor automatically runs rustfmt on save. So the files keep switching back to 2021 formatting whenever I edit them. I can tweak my editor to not do this, but I figured this might be an unintentional bug that affects others.
Metadata
Metadata
Assignees
Labels
A-2024-style-editionArea: style edition 2024Area: style edition 2024A-configArea: configurationArea: configurationgood first issueIssues up for grabs, also good candidates for new rustfmt contributorsIssues up for grabs, also good candidates for new rustfmt contributors