Skip to content

Commit

Permalink
Rollup merge of rust-lang#60520 - matklad:rustfmt-all-the-new-things,…
Browse files Browse the repository at this point in the history
… r=Centril

Add rustfmt toml

This commit adds an rustfmt.toml for using for **new** code.
Old code should continut to use old style, until we put automated
style checks in place.

See
https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81
for the reason why we deviate from the default formatting. The TL;DR
is that currently compiler uses a pretty condensed style of code, and
default settings both create a huge diff and inflate the number of
lines. use_small_heuristics=Max fixes that.

version=Two is required for bug-fixes, which technically can't be made
to the stable first version

cc @Centril: I guess adding config file with agreed-upon formatting doesn't hurt :-)

EDIT: Zullip discussion: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/x.2Epy.20fmt
  • Loading branch information
Centril authored May 4, 2019
2 parents 099c064 + ce39461 commit 68dcca8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Currently, most of the code in the compiler uses historical style.
#
# For new code, consider running rustfmt with this config (it should
# be picked up automatically).
version = "Two"
use_small_heuristics = "Max"

0 comments on commit 68dcca8

Please sign in to comment.