Skip to content

Commit

Permalink
Update use declarations formatting options.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nnethercote committed Jun 12, 2024
1 parent 8337ba9 commit 2f0bb7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 2f0bb7d

Please sign in to comment.