X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=rustfmt.toml;h=73f8cc1ff68c68bbbbfe6216f4b0f00626701672;hb=71a6f58229c00720b35579856bdb64e2a19af521;hp=4e38aace15d1bc00d65bb37e0d739a93b6e359f3;hpb=97bee3a793e287162d8f10635d6769e8d28befab;p=rust.git diff --git a/rustfmt.toml b/rustfmt.toml index 4e38aace15d..73f8cc1ff68 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,74 +1,14 @@ -# 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). +# Run rustfmt with this config (it should be picked up automatically). version = "Two" use_small_heuristics = "Max" +merge_derives = false # by default we ignore everything in the repository # tidy only checks files which are not ignored, each entry follows gitignore style ignore = [ - # remove directories below, or opt out their subdirectories, as they are formatted - "src/bootstrap/", - "src/build_helper/", - "src/liballoc/", - "src/libarena/", - "src/libcore/", - "src/libfmt_macros/", - "src/libgraphviz/", - "src/libpanic_abort/", - "src/libpanic_unwind/", - "src/libproc_macro/", - "src/libprofiler_builtins/", - "src/librustc/", - "src/librustc_apfloat/", - "src/librustc_asan/", - "src/librustc_codegen_llvm/", - "src/librustc_codegen_ssa/", - "src/librustc_codegen_utils/", - "src/librustc_data_structures/", - "src/librustc_driver/", - "src/librustc_errors/", - "src/librustc_feature/", - "src/librustc_incremental/", - "src/librustc_index/", - "src/librustc_interface/", - "src/librustc_lexer/", - "src/librustc_lint/", - "src/librustc_llvm/", - "src/librustc_lsan/", - "src/librustc_macros/", - "src/librustc_metadata/", - "src/librustc_mir/", - "src/librustc_msan/", - "src/librustc_parse/", - "src/librustc_passes/", - "src/librustc_plugin/", - "src/librustc_plugin_impl/", - "src/librustc_privacy/", - "src/librustc_resolve/", - "src/librustc_save_analysis/", - "src/librustc_session/", - "src/librustc_target/", - "src/librustc_traits/", - "src/librustc_tsan/", - "src/librustc_typeck/", - "src/librustdoc/", - "src/libserialize/", - "src/libstd/", - "src/libsyntax/", - "src/libsyntax_expand/", - "src/libsyntax_ext/", - "src/libsyntax_pos/", - "src/libterm/", - "src/libtest/", - "src/libunwind/", - "src/rtstartup/", - "src/rustc/", - "src/rustllvm/", - "src/test/", - "src/tools/", - "src/etc", + # tests for now are not formatted, as they are sometimes pretty-printing constrained + # (and generally rustfmt can move around comments in UI-testing incompatible ways) + "src/test", # do not format submodules "src/doc/book", @@ -86,4 +26,7 @@ ignore = [ "src/tools/rls", "src/tools/rust-installer", "src/tools/rustfmt", + + # We do not format this file as it is externally sourced and auto-generated. + "src/libstd/sys/cloudabi/abi/cloudabi.rs", ]