blob: 75456c3d917ef0132dec0e0768b92e1f1555dbe4 [file] [log] [blame]
Haibo Huangd58366d2020-07-10 20:23:30 -07001# 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).
7version = "Two"
8# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3391)
9error_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.
13use_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)
16overflow_delimited_expr = true
17
18# Apply rustfmt to more places.
19# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3362).
20merge_imports = true
21# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3348).
22format_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.
26edition = "2018"
Haibo Huang6c94c6b2020-11-18 15:37:31 -080027hard_tabs = false
28newline_style = "Unix"
Haibo Huangd58366d2020-07-10 20:23:30 -070029tab_spaces = 4