From ce39461ca75ae5cdc5e7798869d88666ad139646 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 3 May 2019 21:35:21 +0300 Subject: [PATCH] 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 --- rustfmt.toml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 rustfmt.toml diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 00000000000..df230cde9b7 --- /dev/null +++ b/rustfmt.toml @@ -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"