Skip to content

Conversation

Nydauron
Copy link

@Nydauron Nydauron commented Oct 4, 2025

Unlike cargo fmt, rustfmt is agnostic to Cargo.toml and does not pick up the edition from within that file. Instead, rustfmt decides what edition to use based on what is specified inside of .rustfmt.toml or if the edition is explicitly passed into the CLI command.

Having this file helps contributors who have configured auto formatting, on file save or the like, using rustfmt rather than cargo fmt.

Unlike `cargo fmt`, `rustfmt` is agnostic to `Cargo.toml` and does not
pick up the edition from within that file. Instead, `rustfmt` decides
what edition to use based on what is specified inside of `.rustfmt.toml`
or if the edition is explicitly passed into the CLI command.

Having this file helps contributors who have configured auto formatting,
on file save or the like, using `rustfmt` rather than `cargo fmt`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant