1# Rustfmt configuration 2# https://github.com/rust-lang/rustfmt/blob/HEAD/Configurations.md 3 4# Rustfmt cannot format long lines inside macros, but this option detects this. 5# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3391) 6error_on_line_overflow = true 7 8# Override the default formatting style. 9# See https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81. 10use_small_heuristics = "Max" 11# See https://github.com/rust-dev-tools/fmt-rfcs/issues/149. 12# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3370) 13overflow_delimited_expr = true 14# This is unstable (tracking issue: none). 15imports_granularity = "Crate" 16# This is unstable (tracking issue: none). 17group_imports = "StdExternalCrate" 18 19# Apply rustfmt to more places. 20# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3348). 21format_code_in_doc_comments = true 22 23# Automatically fix deprecated style. 24use_field_init_shorthand = true 25use_try_shorthand = true 26 27# Set the default settings again to always apply the proper formatting without 28# being affected by the editor settings. 29edition = "2018" 30hard_tabs = false 31newline_style = "Unix" 32tab_spaces = 4 33