Skip to content

Commit ce39461

Browse files
committed
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
1 parent 546cb21 commit ce39461

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rustfmt.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Currently, most of the code in the compiler uses historical style.
2+
#
3+
# For new code, consider running rustfmt with this config (it should
4+
# be picked up automatically).
5+
version = "Two"
6+
use_small_heuristics = "Max"

0 commit comments

Comments
 (0)