| 
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).  | 
 | 1 | +# Run rustfmt with this config (it should be picked up automatically).  | 
5 | 2 | version = "Two"  | 
6 | 3 | use_small_heuristics = "Max"  | 
 | 4 | +merge_derives = false  | 
7 | 5 | 
 
  | 
8 | 6 | # by default we ignore everything in the repository  | 
9 | 7 | # tidy only checks files which are not ignored, each entry follows gitignore style  | 
10 | 8 | ignore = [  | 
11 |  | - # remove directories below, or opt out their subdirectories, as they are formatted  | 
12 |  | - "src/bootstrap/",  | 
13 |  | - "src/build_helper/",  | 
14 |  | - "src/liballoc/",  | 
15 |  | - "src/libarena/",  | 
16 |  | - "src/libcore/",  | 
17 |  | - "src/libfmt_macros/",  | 
18 |  | - "src/libgraphviz/",  | 
19 |  | - "src/libpanic_abort/",  | 
20 |  | - "src/libpanic_unwind/",  | 
21 |  | - "src/libproc_macro/",  | 
22 |  | - "src/libprofiler_builtins/",  | 
23 |  | - "src/librustc/",  | 
24 |  | - "src/librustc_apfloat/",  | 
25 |  | - "src/librustc_asan/",  | 
26 |  | - "src/librustc_codegen_llvm/",  | 
27 |  | - "src/librustc_codegen_ssa/",  | 
28 |  | - "src/librustc_codegen_utils/",  | 
29 |  | - "src/librustc_data_structures/",  | 
30 |  | - "src/librustc_driver/",  | 
31 |  | - "src/librustc_errors/",  | 
32 |  | - "src/librustc_feature/",  | 
33 |  | - "src/librustc_incremental/",  | 
34 |  | - "src/librustc_index/",  | 
35 |  | - "src/librustc_interface/",  | 
36 |  | - "src/librustc_lexer/",  | 
37 |  | - "src/librustc_lint/",  | 
38 |  | - "src/librustc_llvm/",  | 
39 |  | - "src/librustc_lsan/",  | 
40 |  | - "src/librustc_macros/",  | 
41 |  | - "src/librustc_metadata/",  | 
42 |  | - "src/librustc_mir/",  | 
43 |  | - "src/librustc_msan/",  | 
44 |  | - "src/librustc_parse/",  | 
45 |  | - "src/librustc_passes/",  | 
46 |  | - "src/librustc_plugin/",  | 
47 |  | - "src/librustc_plugin_impl/",  | 
48 |  | - "src/librustc_privacy/",  | 
49 |  | - "src/librustc_resolve/",  | 
50 |  | - "src/librustc_save_analysis/",  | 
51 |  | - "src/librustc_session/",  | 
52 |  | - "src/librustc_target/",  | 
53 |  | - "src/librustc_traits/",  | 
54 |  | - "src/librustc_tsan/",  | 
55 |  | - "src/librustc_typeck/",  | 
56 |  | - "src/librustdoc/",  | 
57 |  | - "src/libserialize/",  | 
58 |  | - "src/libstd/",  | 
59 |  | - "src/libsyntax/",  | 
60 |  | - "src/libsyntax_expand/",  | 
61 |  | - "src/libsyntax_ext/",  | 
62 |  | - "src/libsyntax_pos/",  | 
63 |  | - "src/libterm/",  | 
64 |  | - "src/libtest/",  | 
65 |  | - "src/libunwind/",  | 
66 |  | - "src/rtstartup/",  | 
67 |  | - "src/rustc/",  | 
68 |  | - "src/rustllvm/",  | 
69 |  | - "src/test/",  | 
70 |  | - "src/tools/",  | 
71 |  | - "src/etc",  | 
 | 9 | + # tests for now are not formatted, as they are sometimes pretty-printing constrained  | 
 | 10 | + # (and generally rustfmt can move around comments in UI-testing incompatible ways)  | 
 | 11 | + "src/test",  | 
 | 12 | + | 
 | 13 | + # tidy issues (line length, etc.)  | 
 | 14 | + # to be fixed shortly  | 
 | 15 | + "src/libcore/iter/adapters/mod.rs",  | 
 | 16 | + "src/libcore/iter/traits/iterator.rs",  | 
 | 17 | + "src/librustc/hir/lowering.rs",  | 
 | 18 | + "src/librustc/infer/error_reporting/nice_region_error/outlives_closure.rs",  | 
 | 19 | + "src/librustc/lint/mod.rs",  | 
 | 20 | + "src/librustc/middle/resolve_lifetime.rs",  | 
 | 21 | + "src/librustc/traits/mod.rs",  | 
 | 22 | + "src/librustc/ty/constness.rs",  | 
 | 23 | + "src/librustc/ty/context.rs",  | 
 | 24 | + "src/librustc/ty/wf.rs",  | 
 | 25 | + "src/librustc_codegen_llvm/back/write.rs",  | 
 | 26 | + "src/librustc_codegen_llvm/consts.rs",  | 
 | 27 | + "src/librustc_codegen_llvm/debuginfo/metadata.rs",  | 
 | 28 | + "src/librustc_codegen_ssa/base.rs",  | 
 | 29 | + "src/librustc_codegen_ssa/mir/place.rs",  | 
 | 30 | + "src/librustc_codegen_utils/symbol_names/v0.rs",  | 
 | 31 | + "src/librustc_errors/emitter.rs",  | 
 | 32 | + "src/librustc_mir/borrow_check/diagnostics/mutability_errors.rs",  | 
 | 33 | + "src/librustc_mir/borrow_check/type_check/mod.rs",  | 
 | 34 | + "src/librustc_mir/build/expr/as_rvalue.rs",  | 
 | 35 | + "src/librustc_mir/build/matches/mod.rs",  | 
 | 36 | + "src/librustc_mir/build/mod.rs",  | 
 | 37 | + "src/librustc_mir/const_eval.rs",  | 
 | 38 | + "src/librustc_mir/interpret/place.rs",  | 
 | 39 | + "src/librustc_mir/monomorphize/collector.rs",  | 
 | 40 | + "src/librustc_passes/ast_validation.rs",  | 
 | 41 | + "src/librustc_resolve/lib.rs",  | 
 | 42 | + "src/librustc_resolve/resolve_imports.rs",  | 
 | 43 | + "src/librustc_typeck/astconv.rs",  | 
 | 44 | + "src/librustc_typeck/check/_match.rs",  | 
 | 45 | + "src/librustc_typeck/check/coercion.rs",  | 
 | 46 | + "src/librustc_typeck/check/method/confirm.rs",  | 
 | 47 | + "src/librustc_typeck/check/mod.rs",  | 
 | 48 | + "src/librustc_typeck/check/wfcheck.rs",  | 
 | 49 | + "src/librustdoc/html/markdown/tests.rs",  | 
 | 50 | + "src/libstd/sys/sgx/abi/mem.rs",  | 
 | 51 | + "src/libstd/sys/unix/os.rs",  | 
 | 52 | + "src/libsyntax_expand/parse/lexer/tests.rs",  | 
 | 53 | + "src/libsyntax_expand/parse/tests.rs",  | 
 | 54 | + "src/libsyntax_ext/test.rs",  | 
 | 55 | + "src/tools/build-manifest/src/main.rs",  | 
 | 56 | + "src/librustc_feature",  | 
72 | 57 | 
 
  | 
73 | 58 |  # do not format submodules  | 
74 | 59 |  "src/doc/book",  | 
 | 
0 commit comments