From 2f0bb7d8973a44c6d7ca1ddbb64c82049019d72f Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 13 Jun 2024 09:16:09 +1000 Subject: [PATCH] Update `use` declarations formatting options. As decided in rust-lang/compiler-team#750. Use declarations are currently wildly inconsistent because rustfmt is quite unopinionated about how they should be formatted. The `rustfmt.toml` additions makes rustfmt more opinionated, which avoids the need for any decision when adding new use declarations to a file. This commit only updates `rustfmt.toml`. The next commit will do the reformatting. --- rustfmt.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rustfmt.toml b/rustfmt.toml index b15ffdca38a06..f8afad60b2ea6 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -2,6 +2,8 @@ version = "Two" use_small_heuristics = "Max" merge_derives = false +group_imports = "StdExternalCrate" +imports_granularity = "Module" # Files to ignore. Each entry uses gitignore syntax, but `!` prefixes aren't allowed. ignore = [