3 Rustfmt is designed to be very configurable. You can create a TOML file called `rustfmt.toml` or `.rustfmt.toml`, place it in the project or any other parent directory and it will apply the options in that file.
5 A possible content of `rustfmt.toml` or `.rustfmt.toml` might look like this:
10 reorder_imported_names = true
13 # Configuration Options
15 Below you find a detailed visual guide on all the supported configuration options of rustfmt:
17 ## `array_horizontal_layout_threshold`
19 How many elements array must have before rustfmt uses horizontal layout.
20 Use this option to prevent a huge array from being vertically formatted.
22 - **Default value**: `0`
23 - **Possible values**: any positive integer
25 **Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
30 // Each element will be placed on its own line.
45 // Each element will be placed on the same line as much as possible.
46 let a = vec![0, 1, 2, 3, 4, ...
54 - **Default value**: `"Block"`
55 - **Possible values**: `"Block"`, `"Visual"`
74 let lorem = vec!["ipsum",
85 Maximum width of an array literal before falling back to vertical formatting
87 - **Default value**: `60`
88 - **Possible values**: any positive integer
90 **Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
92 #### Lines shorter than `array_width`:
95 vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
98 #### Lines longer than `array_width`:
99 See [`array_layout`](#array_layout).
105 - **Default value**: `"Block"`
106 - **Possible values**: `"Block"`, `"Visual"`
123 let lorem = ipsum.dolor()
131 See also [`chain_one_line_max`](#chain_one_line_max).
133 ## `chain_one_line_max`
135 Maximum length of a chain to fit on a single line
137 - **Default value**: `60`
138 - **Possible values**: any positive integer
140 #### Lines shorter than `chain_one_line_max`:
142 let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
145 #### Lines longer than `chain_one_line_max`:
146 See [`chain_indent`](#chain_indent).
148 ## `chain_split_single_child`
150 Split a chain with a single child if its length exceeds [`chain_one_line_max`](#chain_one_line_max).
152 - **Default value**: `false`
153 - **Possible values**: `false`, `true`
158 let files = fs::read_dir("tests/coverage/source").expect("Couldn't read source dir");
164 let files = fs::read_dir("tests/coverage/source")
165 .expect("Couldn't read source dir");
168 See also [`chain_one_line_max`](#chain_one_line_max).
170 ## `closure_block_indent_threshold`
172 How many lines a closure must have before it is block indented. -1 means never use block indent.
174 - **Default value**: `7`
175 - **Possible values**: `-1`, or any positive integer
177 #### Closures shorter than `closure_block_indent_threshold`:
188 #### Closures longer than `closure_block_indent_threshold`:
196 println!("consectetur");
197 println!("adipiscing");
202 ## `combine_control_expr`
204 Combine control expressions with function calls.
206 - **Default value**: `true`
207 - **Possible values**: `true`, `false`
221 foo!(if let Some(..) = x {
234 foo!(while let Some(..) = x {
260 Maximum length of comments. No effect unless`wrap_comments = true`.
262 - **Default value**: `80`
263 - **Possible values**: any positive integer
265 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
267 #### Comments shorter than `comment_width`:
269 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
272 #### Comments longer than `comment_width`:
274 // Lorem ipsum dolor sit amet,
275 // consectetur adipiscing elit.
278 See also [`wrap_comments`](#wrap_comments).
280 ## `condense_wildcard_suffixes`
282 Replace strings of _ wildcards by a single .. in tuple patterns
284 - **Default value**: `false`
285 - **Possible values**: `true`, `false`
290 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
296 let (lorem, ipsum, ..) = (1, 2, 3, 4);
301 Indent style for control flow statements
303 - **Default value**: `"Rfc"`
304 - **Possible values**: `"Rfc"`, `"Legacy"`
327 See also: [`control_brace_style`](#control_brace_style).
329 ## `control_brace_style`
331 Brace style for control flow constructs
333 - **Default value**: `"AlwaysSameLine"`
334 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
336 #### `"AlwaysNextLine"`:
349 #### `"AlwaysSameLine"`:
359 #### `"ClosingNextLine"`:
370 ## `disable_all_formatting`
372 Don't reformat anything
374 - **Default value**: `false`
375 - **Possible values**: `true`, `false`
377 ## `error_on_line_overflow`
379 Error if unable to get all lines within max_width
381 - **Default value**: `true`
382 - **Possible values**: `true`, `false`
384 See also [`max_width`](#max_width).
388 Argument density in functions
390 - **Default value**: `"Tall"`
391 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
397 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
399 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
403 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
404 adipiscing: Adipiscing, elit: Elit);
406 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
407 adipiscing: Adipiscing, elit: Elit) {
413 #### `"CompressedIfEmpty"`:
417 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
419 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
423 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
424 adipiscing: Adipiscing, elit: Elit);
426 fn lorem(ipsum: Ipsum,
430 consectetur: onsectetur,
431 adipiscing: Adipiscing,
442 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
444 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
448 fn lorem(ipsum: Ipsum,
452 consectetur: onsectetur,
453 adipiscing: Adipiscing,
456 fn lorem(ipsum: Ipsum,
460 consectetur: onsectetur,
461 adipiscing: Adipiscing,
472 fn lorem(ipsum: Ipsum,
477 fn lorem(ipsum: Ipsum,
484 fn lorem(ipsum: Ipsum,
488 consectetur: onsectetur,
489 adipiscing: Adipiscing,
492 fn lorem(ipsum: Ipsum,
496 consectetur: onsectetur,
497 adipiscing: Adipiscing,
506 Layout of function arguments and tuple structs
508 - **Default value**: `"Block"`
509 - **Possible values**: `"Block"`, `"Visual"`
516 fn lorem(ipsum: usize) {}
536 fn lorem(ipsum: usize) {}
538 fn lorem(ipsum: usize,
549 ## `fn_args_paren_newline`
551 If function argument parenthesis goes on a newline
553 - **Default value**: `false`
554 - **Possible values**: `true`, `false`
564 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
577 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
584 Brace style for functions
586 - **Default value**: `"SameLineWhere"`
587 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
589 #### `"AlwaysNextLine"`:
597 fn lorem(ipsum: usize)
602 fn lorem<T>(ipsum: T)
603 where T: Add + Sub + Mul + Div
609 #### `"PreferSameLine"`:
616 fn lorem(ipsum: usize) {
620 fn lorem<T>(ipsum: T)
621 where T: Add + Sub + Mul + Div {
626 #### `"SameLineWhere"`:
633 fn lorem(ipsum: usize) {
637 fn lorem<T>(ipsum: T)
638 where T: Add + Sub + Mul + Div
646 Indentation for function calls, etc.
648 - **Default value**: `"Block"`
649 - **Possible values**: `"Block"`, `"Visual"`
681 Maximum width of the args of a function call before falling back to vertical formatting
683 - **Default value**: `60`
684 - **Possible values**: any positive integer
686 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
688 #### Function call shorter than `fn_call_width`:
690 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
693 #### Function call longer than `fn_call_width`:
695 See [`fn_call_style`](#fn_call_style).
697 ## `fn_empty_single_line`
699 Put empty-body functions on a single line
701 - **Default value**: `true`
702 - **Possible values**: `true`, `false`
717 See also [`control_brace_style`](#control_brace_style).
719 ## `fn_return_indent`
721 Location of return type in function declaration
723 - **Default value**: `"WithArgs"`
724 - **Possible values**: `"WithArgs"`, `"WithWhereClause"`
729 fn lorem(ipsum: Ipsum,
733 consectetur: Consectetur,
734 adipiscing: Adipiscing)
743 #### `"WithWhereClause"`:
746 fn lorem(ipsum: Ipsum,
750 consectetur: Consectetur,
751 adipiscing: Adipiscing)
762 Put single-expression functions on a single line
764 - **Default value**: `false`
765 - **Possible values**: `true`, `false`
770 fn lorem() -> usize {
774 fn lorem() -> usize {
783 fn lorem() -> usize { 42 }
785 fn lorem() -> usize {
791 See also [`control_brace_style`](#control_brace_style).
793 ## `force_explicit_abi`
795 Always print the abi for extern items
797 - **Default value**: `true`
798 - **Possible values**: `true`, `false`
800 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
806 pub static lorem: c_int;
814 pub static lorem: c_int;
818 ## `force_format_strings`
820 Always format string literals
822 - **Default value**: `false`
823 - **Possible values**: `true`, `false`
825 See [`format_strings`](#format_strings).
827 See also [`max_width`](#max_width).
831 Format string literals where necessary
833 - **Default value**: `false`
834 - **Possible values**: `true`, `false`
839 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
846 "ipsum dolor sit amet consectetur \
847 adipiscing elit lorem ipsum dolor sit";
850 See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
854 Indentation of generics
856 - **Default value**: `"Block"`
857 - **Possible values**: `"Block"`, `"Visual"`
867 Adipiscing: Eq = usize,
868 Consectetur: Eq = usize,
874 adipiscing: Adipiscing,
875 consectetur: Consectetur,
885 fn lorem<Ipsum: Eq = usize,
889 Adipiscing: Eq = usize,
890 Consectetur: Eq = usize,
896 adipiscing: Adipiscing,
897 consectetur: Consectetur,
906 Use tab characters for indentation, spaces for alignment
908 - **Default value**: `false`
909 - **Possible values**: `true`, `false`
914 fn lorem() -> usize {
915 42 // spaces before 42
922 fn lorem() -> usize {
927 See also: [`tab_spaces`](#tab_spaces).
929 ## `impl_empty_single_line`
931 Put empty-body implementations on a single line
933 - **Default value**: `true`
934 - **Possible values**: `true`, `false`
949 See also [`item_brace_style`](#item_brace_style).
951 ## `indent_match_arms`
953 Indent match arms instead of keeping them at the same indentation level as the match keyword
955 - **Default value**: `true`
956 - **Possible values**: `true`, `false`
980 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
984 Indent style of imports
986 - **Default Value**: `"Visual"`
987 - **Possible values**: `"Block"`, `"Visual"`
1007 See also: [`imports_layout`](#imports_layout).
1011 Item layout inside a imports block
1013 - **Default value**: "Mixed"
1014 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
1019 use foo::{xxx, yyy, zzz};
1021 use foo::{aaa, bbb, ccc,
1027 **Note**: This option forces to put everything on one line and may exceeds `max_width`.
1030 use foo::{xxx, yyy, zzz};
1032 use foo::{aaa, bbb, ccc, ddd, eee, fff};
1035 #### `"HorizontalVertical"`
1038 use foo::{xxx, yyy, zzz};
1063 ## `item_brace_style`
1065 Brace style for structs and enums
1067 - **Default value**: `"SameLineWhere"`
1068 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
1070 #### `"AlwaysNextLine"`:
1085 #### `"PreferSameLine"`:
1098 #### `"SameLineWhere"`:
1112 ## `match_block_trailing_comma`
1114 Put a trailing comma after a block based match arm (non-block arms are not affected)
1116 - **Default value**: `false`
1117 - **Possible values**: `true`, `false`
1126 Lorem::Dolor => println!("dolor"),
1137 Lorem::Dolor => println!("dolor"),
1141 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1145 Maximum width of each line
1147 - **Default value**: `100`
1148 - **Possible values**: any positive integer
1150 See also [`error_on_line_overflow`](#error_on_line_overflow).
1154 Unix or Windows line endings
1156 - **Default value**: `"Unix"`
1157 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1159 ## `normalize_comments`
1161 Convert /* */ comments to // comments where possible
1163 - **Default value**: `false`
1164 - **Possible values**: `true`, `false`
1170 fn dolor() -> usize {}
1173 fn adipiscing() -> usize {}
1180 fn dolor() -> usize {}
1183 fn adipiscing() -> usize {}
1186 ## `reorder_imported_names`
1188 Reorder lists of names in import statements alphabetically
1190 - **Default value**: `false`
1191 - **Possible values**: `true`, `false`
1196 use super::{lorem, ipsum, dolor, sit};
1202 use super::{dolor, ipsum, lorem, sit};
1205 See also [`reorder_imports`](#reorder_imports).
1207 ## `reorder_imports`
1209 Reorder import statements alphabetically
1211 - **Default value**: `false`
1212 - **Possible values**: `true`, `false`
1232 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1234 ## `reorder_imports_in_group`
1236 Reorder import statements in group
1238 - **Default value**: `false`
1239 - **Possible values**: `true`, `false`
1241 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1267 See also [`reorder_imports`](#reorder_imports).
1269 ## `single_line_if_else_max_width`
1271 Maximum line length for single line if-else expressions.
1273 - **Default value**: `50`
1274 - **Possible values**: any positive integer
1276 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1278 #### Lines shorter than `single_line_if_else_max_width`:
1280 let lorem = if ipsum { dolor } else { sit };
1283 #### Lines longer than `single_line_if_else_max_width`:
1285 let lorem = if ipsum {
1292 See also: [`control_brace_style`](#control_brace_style).
1296 Don't reformat out of line modules
1298 - **Default value**: `false`
1299 - **Possible values**: `true`, `false`
1301 ## `space_after_bound_colon`
1303 Leave a space after the colon in a trait or lifetime bound
1305 - **Default value**: `true`
1306 - **Possible values**: `true`, `false`
1311 fn lorem<T:Eq>(t: T) {
1319 fn lorem<T: Eq>(t: T) {
1324 See also: [`space_before_bound`](#space_before_bound).
1326 ## `struct_field_align_threshold`
1328 The maximum diff of width between struct fields to be aligned with each other.
1330 - **Default value** : 0
1331 - **Possible values**: any positive integer
1353 ## `space_after_struct_lit_field_colon`
1355 Leave a space after the colon in a struct literal field
1357 - **Default value**: `true`
1358 - **Possible values**: `true`, `false`
1378 See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
1380 ## `space_after_type_annotation_colon`
1382 Leave a space after the colon in a type annotation
1384 - **Default value**: `true`
1385 - **Possible values**: `true`, `false`
1390 fn lorem<T: Eq>(t:T) {
1391 let ipsum:Dolor = sit;
1398 fn lorem<T: Eq>(t: T) {
1399 let ipsum: Dolor = sit;
1403 See also: [`space_before_type_annotation`](#space_before_type_annotation).
1405 ## `space_before_bound`
1407 Leave a space before the colon in a trait or lifetime bound
1409 - **Default value**: `false`
1410 - **Possible values**: `true`, `false`
1415 fn lorem<T: Eq>(t: T) {
1416 let ipsum: Dolor = sit;
1423 fn lorem<T : Eq>(t: T) {
1424 let ipsum: Dolor = sit;
1428 See also: [`space_after_bound_colon`](#space_after_bound_colon).
1430 ## `space_before_struct_lit_field_colon`
1432 Leave a space before the colon in a struct literal field
1434 - **Default value**: `false`
1435 - **Possible values**: `true`, `false`
1455 See also: [`space_after_struct_lit_field_colon`](#space_after_struct_lit_field_colon).
1457 ## `space_before_type_annotation`
1459 Leave a space before the colon in a type annotation
1461 - **Default value**: `false`
1462 - **Possible values**: `true`, `false`
1467 fn lorem<T: Eq>(t: T) {
1468 let ipsum: Dolor = sit;
1475 fn lorem<T: Eq>(t : T) {
1476 let ipsum : Dolor = sit;
1480 See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
1482 ## `spaces_around_ranges`
1484 Put spaces around the .. and ... range operators
1486 - **Default value**: `false`
1487 - **Possible values**: `true`, `false`
1498 let lorem = 0 .. 10;
1501 ## `spaces_within_angle_brackets`
1503 Put spaces within non-empty generic arguments
1505 - **Default value**: `false`
1506 - **Possible values**: `true`, `false`
1511 fn lorem<T: Eq>(t: T) {
1519 fn lorem< T: Eq >(t: T) {
1524 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1526 ## `spaces_within_parens`
1528 Put spaces within non-empty parentheses
1530 - **Default value**: `false`
1531 - **Possible values**: `true`, `false`
1536 fn lorem<T: Eq>(t: T) {
1537 let lorem = (ipsum, dolor);
1544 fn lorem<T: Eq>( t: T ) {
1545 let lorem = ( ipsum, dolor );
1549 See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1551 ## `spaces_within_square_brackets`
1553 Put spaces within non-empty square brackets
1555 - **Default value**: `false`
1556 - **Possible values**: `true`, `false`
1561 let lorem: [usize; 2] = [ipsum, dolor];
1567 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1570 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
1572 ## `struct_lit_multiline_style`
1574 Multiline style on literal structs
1576 - **Default value**: `"PreferSingle"`
1577 - **Possible values**: `"ForceMulti"`, `"PreferSingle"`
1579 #### `"ForceMulti"`:
1588 #### `"PreferSingle"`:
1591 let lorem = Lorem { ipsum: dolor, sit: amet };
1594 See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
1596 ## `struct_lit_style`
1598 Style of struct definition
1600 - **Default value**: `"Block"`
1601 - **Possible values**: `"Block"`, `"Visual"`
1615 let lorem = Lorem { ipsum: dolor,
1619 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1621 ## `struct_lit_width`
1623 Maximum width in the body of a struct lit before falling back to vertical formatting
1625 - **Default value**: `18`
1626 - **Possible values**: any positive integer
1628 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1630 #### Lines shorter than `struct_lit_width`:
1632 let lorem = Lorem { ipsum: dolor, sit: amet };
1635 #### Lines longer than `struct_lit_width`:
1636 See [`struct_lit_style`](#struct_lit_style).
1638 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1640 ## `struct_variant_width`
1642 Maximum width in the body of a struct variant before falling back to vertical formatting
1644 - **Default value**: `35`
1645 - **Possible values**: any positive integer
1647 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1649 #### Struct variants shorter than `struct_variant_width`:
1654 Sit { amet: Consectetur, adipiscing: Elit },
1658 #### Struct variants longer than `struct_variant_width`:
1672 Number of spaces per tab
1674 - **Default value**: `4`
1675 - **Possible values**: any positive integer
1681 let ipsum = dolor();
1683 "amet consectetur adipiscing elit."
1692 let ipsum = dolor();
1694 "amet consectetur adipiscing elit."
1699 See also: [`hard_tabs`](#hard_tabs).
1701 ## `take_source_hints`
1703 Retain some formatting characteristics from the source code
1705 - **Default value**: `false`
1706 - **Possible values**: `true`, `false`
1713 .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
1729 Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
1733 How to handle trailing commas for lists
1735 - **Default value**: `"Vertical"`
1736 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1741 let Lorem { ipsum, dolor, sit, } = amet;
1755 let Lorem { ipsum, dolor, sit } = amet;
1769 let Lorem { ipsum, dolor, sit } = amet;
1780 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1782 ## `trailing_semicolon`
1784 Add trailing semicolon after break, continue and return
1786 - **Default value**: `true`
1787 - **Possible values**: `true`, `false`
1803 ## `type_punctuation_density`
1805 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1807 - **Default value**: `"Wide"`
1808 - **Possible values**: `"Compressed"`, `"Wide"`
1810 #### `"Compressed"`:
1813 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1821 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1826 ## `use_try_shorthand`
1828 Replace uses of the try! macro by the ? shorthand
1830 - **Default value**: `false`
1831 - **Possible values**: `true`, `false`
1836 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1842 let lorem = ipsum.map(|dolor| dolor.sit())?;
1847 Density of a where clause
1849 - **Default value**: `"CompressedIfEmpty"`
1850 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1852 #### `"Compressed"`:
1856 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1858 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
1864 #### `"CompressedIfEmpty"`:
1868 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1870 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1882 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1885 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1893 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
1899 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1902 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1910 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1912 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1916 Element layout inside a where clause
1918 - **Default value**: `"Vertical"`
1919 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
1921 #### `"Horizontal"`:
1924 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1925 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1930 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1931 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1937 #### `"HorizontalVertical"`:
1940 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1941 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1946 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1947 where Ipsum: IpsumDolorSitAmet,
1948 Dolor: DolorSitAmetConsectetur,
1949 Sit: SitAmetConsecteturAdipiscing,
1950 Amet: AmetConsecteturAdipiscingElit
1959 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1960 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1965 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1966 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
1967 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1976 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1977 where Ipsum: IpsumDolorSitAmet,
1978 Dolor: DolorSitAmetConsectetur
1983 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1984 where Ipsum: IpsumDolorSitAmet,
1985 Dolor: DolorSitAmetConsectetur,
1986 Sit: SitAmetConsecteturAdipiscing,
1987 Amet: AmetConsecteturAdipiscingElit
1993 See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1995 ## `where_pred_indent`
1997 Indentation style of a where predicate
1999 - **Default value**: `"Visual"`
2000 - **Possible values**: `"Block"`, `"Visual"`
2005 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2018 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2028 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
2032 Overall strategy for where clauses
2034 - **Default value**: `"Rfc"`
2035 - **Possible values**: `"Rfc"`, `"Legacy"`
2040 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2054 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2064 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
2068 Break comments to fit on the line
2070 - **Default value**: `false`
2071 - **Possible values**: `true`, `false`
2076 // Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
2082 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
2083 // sed do eiusmod tempor incididunt ut labore et dolore
2084 // magna aliqua. Ut enim ad minim veniam, quis nostrud
2085 // exercitation ullamco laboris nisi ut aliquip ex ea
2086 // commodo consequat.
2089 ## `wrap_match_arms`
2091 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
2093 - **Default value**: `true`
2094 - **Possible values**: `true`, `false`
2101 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
2102 false => println!("{}", sit),
2111 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
2113 false => println!("{}", sit),
2117 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
2121 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
2123 - **Default value**: `"Replace"`
2124 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`