Haibo Huang | d58366d | 2020-07-10 20:23:30 -0700 | [diff] [blame] | 1 | # Rustfmt configuration |
| 2 | # https://github.com/rust-lang/rustfmt/blob/master/Configurations.md |
| 3 | |
| 4 | # This is required for bug-fixes, which technically can't be made to the stable |
| 5 | # first version. |
| 6 | # This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3383). |
| 7 | version = "Two" |
| 8 | # This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3391) |
| 9 | error_on_line_overflow = true |
| 10 | |
| 11 | # Override the default formatting style. |
| 12 | # See https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81. |
| 13 | use_small_heuristics = "Max" |
| 14 | # See https://github.com/rust-dev-tools/fmt-rfcs/issues/149. |
| 15 | # This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3370) |
| 16 | overflow_delimited_expr = true |
| 17 | |
| 18 | # Apply rustfmt to more places. |
| 19 | # This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3362). |
| 20 | merge_imports = true |
| 21 | # This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3348). |
| 22 | format_code_in_doc_comments = true |
| 23 | |
| 24 | # Set the default settings again to always apply the proper formatting without |
| 25 | # being affected by the editor settings. |
| 26 | edition = "2018" |
Haibo Huang | 6c94c6b | 2020-11-18 15:37:31 -0800 | [diff] [blame] | 27 | hard_tabs = false |
| 28 | newline_style = "Unix" |
Haibo Huang | d58366d | 2020-07-10 20:23:30 -0700 | [diff] [blame] | 29 | tab_spaces = 4 |