From 59f32c433cdb59a258e21b8489c4352070c344e7 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 27 Feb 2025 10:41:51 -0800 Subject: [PATCH] Mention both `rustfmt.toml` and `.rustfmt.toml` I don't know if one or the other is really preferred, but I figure the reader can decide for themselves. Closes https://github.com/rust-lang/edition-guide/issues/371 --- src/rust-2024/rustfmt-style-edition.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rust-2024/rustfmt-style-edition.md b/src/rust-2024/rustfmt-style-edition.md index aff1ed87..eb5d25e2 100644 --- a/src/rust-2024/rustfmt-style-edition.md +++ b/src/rust-2024/rustfmt-style-edition.md @@ -48,7 +48,7 @@ for both parsing and the 2024 edition of the Style Guide: rustfmt lib.rs --edition 2024 ``` -The style edition can also be set in a `rustfmt.toml` configuration file: +The style edition can also be set in a `rustfmt.toml` or `.rustfmt.toml` configuration file: ```toml style_edition = "2024" ``` @@ -73,7 +73,7 @@ Running `cargo fmt` or `rustfmt` with the 2024 edition or style edition will automatically migrate formatting over to the 2024 style edition formatting. Projects who have contributors that may utilize their editor's format-on-save -features are also strongly encouraged to add a `.rustfmt.toml` file to their project +features are also strongly encouraged to add a `rustfmt.toml` file to their project that includes the corresponding `style_edition` utilized within their project, or to encourage their users to ensure their local editor format-on-save feature is configured to use that same `style_edition`.