From 0f8fbe6fa5194a768d89db6e119dcdd053a6379b Mon Sep 17 00:00:00 2001 From: Vindaar Date: Wed, 10 Dec 2025 15:19:30 +0100 Subject: [PATCH] add edition field to rustfmt.toml file This is important. Without this line, any invocation of `rustfmt` directly is going to read rustfmt.toml, but fall back to the default edition, which is 2015 (or was until recently). This causes the code to be formatted slightly differently from someone who runs `cargo fmt`. The latter looks up the edition from the Cargo.toml file. In Emacs for example the standard way to use rustfmt is via the binary directly and *not* via Cargo. So any editor / tooling that works like Emacs will produce wrongly formatted code despite the fact that rustfmt is used. --- rustfmt.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/rustfmt.toml b/rustfmt.toml index 44148a2..c7ef391 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1 +1,2 @@ +edition = "2024" reorder_imports = true