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.
46 // Each element will be placed on the same line as much as possible.
57 - **Default value**: `"Block"`
58 - **Possible values**: `"Block"`, `"Visual"`
77 let lorem = vec!["ipsum",
88 Maximum width of an array literal before falling back to vertical formatting
90 - **Default value**: `60`
91 - **Possible values**: any positive integer
93 **Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
95 #### Lines shorter than `array_width`:
97 let lorem = vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
100 #### Lines longer than `array_width`:
101 See [`array_layout`](#array_layout).
107 - **Default value**: `"Block"`
108 - **Possible values**: `"Block"`, `"Visual"`
125 let lorem = ipsum.dolor()
133 See also [`chain_one_line_max`](#chain_one_line_max).
135 ## `chain_one_line_max`
137 Maximum length of a chain to fit on a single line
139 - **Default value**: `60`
140 - **Possible values**: any positive integer
142 #### Lines shorter than `chain_one_line_max`:
144 let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
147 #### Lines longer than `chain_one_line_max`:
148 See [`chain_indent`](#chain_indent).
150 ## `chain_split_single_child`
152 Split a chain with a single child if its length exceeds [`chain_one_line_max`](#chain_one_line_max).
154 - **Default value**: `false`
155 - **Possible values**: `false`, `true`
160 let files = fs::read_dir("tests/coverage/source").expect("Couldn't read source dir");
166 let files = fs::read_dir("tests/coverage/source")
167 .expect("Couldn't read source dir");
170 See also [`chain_one_line_max`](#chain_one_line_max).
172 ## `closure_block_indent_threshold`
174 How many lines a closure must have before it is block indented. -1 means never use block indent.
176 - **Default value**: `7`
177 - **Possible values**: `-1`, or any positive integer
179 #### Closures shorter than `closure_block_indent_threshold`:
190 #### Closures longer than `closure_block_indent_threshold`:
198 println!("consectetur");
199 println!("adipiscing");
204 **Note**: This option only takes effect when `fn_call_style` is set to `"Visual"`.
206 ## `combine_control_expr`
208 Combine control expressions with function calls.
210 - **Default value**: `true`
211 - **Possible values**: `true`, `false`
225 foo!(if let Some(..) = x {
238 foo!(while let Some(..) = x {
264 Maximum length of comments. No effect unless`wrap_comments = true`.
266 - **Default value**: `80`
267 - **Possible values**: any positive integer
269 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
271 #### Comments shorter than `comment_width`:
273 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
276 #### Comments longer than `comment_width`:
278 // Lorem ipsum dolor sit amet,
279 // consectetur adipiscing elit.
282 See also [`wrap_comments`](#wrap_comments).
284 ## `condense_wildcard_suffixes`
286 Replace strings of _ wildcards by a single .. in tuple patterns
288 - **Default value**: `false`
289 - **Possible values**: `true`, `false`
294 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
300 let (lorem, ipsum, ..) = (1, 2, 3, 4);
305 Indent style for control flow statements
307 - **Default value**: `"Rfc"`
308 - **Possible values**: `"Rfc"`, `"Legacy"`
331 See also: [`control_brace_style`](#control_brace_style).
333 ## `control_brace_style`
335 Brace style for control flow constructs
337 - **Default value**: `"AlwaysSameLine"`
338 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
340 #### `"AlwaysNextLine"`:
353 #### `"AlwaysSameLine"`:
363 #### `"ClosingNextLine"`:
374 ## `disable_all_formatting`
376 Don't reformat anything
378 - **Default value**: `false`
379 - **Possible values**: `true`, `false`
381 ## `error_on_line_overflow`
383 Error if unable to get all lines within max_width
385 - **Default value**: `true`
386 - **Possible values**: `true`, `false`
388 See also [`max_width`](#max_width).
392 Argument density in functions
394 - **Default value**: `"Tall"`
395 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
401 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
403 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
408 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
409 adipiscing: Adipiscing, elit: Elit,
413 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
414 adipiscing: Adipiscing, elit: Elit,
421 #### `"CompressedIfEmpty"`:
425 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
427 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
432 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
433 adipiscing: Adipiscing, elit: Elit,
441 consectetur: onsectetur,
442 adipiscing: Adipiscing,
454 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
456 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
465 consectetur: onsectetur,
466 adipiscing: Adipiscing,
475 consectetur: onsectetur,
476 adipiscing: Adipiscing,
488 fn lorem(ipsum: Ipsum,
493 fn lorem(ipsum: Ipsum,
500 fn lorem(ipsum: Ipsum,
504 consectetur: onsectetur,
505 adipiscing: Adipiscing,
508 fn lorem(ipsum: Ipsum,
512 consectetur: onsectetur,
513 adipiscing: Adipiscing,
522 Layout of function arguments and tuple structs
524 - **Default value**: `"Block"`
525 - **Possible values**: `"Block"`, `"Visual"`
532 fn lorem(ipsum: usize) {}
552 fn lorem(ipsum: usize) {}
554 fn lorem(ipsum: usize,
565 ## `fn_args_paren_newline`
567 If function argument parenthesis goes on a newline
569 - **Default value**: `false`
570 - **Possible values**: `true`, `false`
580 ) -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
594 ) -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
601 Brace style for functions
603 - **Default value**: `"SameLineWhere"`
604 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
606 #### `"AlwaysNextLine"`:
614 fn lorem(ipsum: usize)
619 fn lorem<T>(ipsum: T)
621 T: Add + Sub + Mul + Div,
627 #### `"PreferSameLine"`:
634 fn lorem(ipsum: usize) {
638 fn lorem<T>(ipsum: T)
640 T: Add + Sub + Mul + Div, {
645 #### `"SameLineWhere"`:
652 fn lorem(ipsum: usize) {
656 fn lorem<T>(ipsum: T)
658 T: Add + Sub + Mul + Div,
666 Indentation for function calls, etc.
668 - **Default value**: `"Block"`
669 - **Possible values**: `"Block"`, `"Visual"`
701 Maximum width of the args of a function call before falling back to vertical formatting
703 - **Default value**: `60`
704 - **Possible values**: any positive integer
706 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
708 #### Function call shorter than `fn_call_width`:
710 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
713 #### Function call longer than `fn_call_width`:
715 See [`fn_call_style`](#fn_call_style).
717 ## `fn_empty_single_line`
719 Put empty-body functions on a single line
721 - **Default value**: `true`
722 - **Possible values**: `true`, `false`
737 See also [`control_brace_style`](#control_brace_style).
739 ## `fn_return_indent`
741 Location of return type in function declaration
743 - **Default value**: `"WithArgs"`
744 - **Possible values**: `"WithArgs"`, `"WithWhereClause"`
749 fn lorem(ipsum: Ipsum,
753 consectetur: Consectetur,
754 adipiscing: Adipiscing)
763 #### `"WithWhereClause"`:
766 fn lorem(ipsum: Ipsum,
770 consectetur: Consectetur,
771 adipiscing: Adipiscing)
780 **Note**: This option only takes effect when `fn_call_style` is set to `"Visual"`.
784 Put single-expression functions on a single line
786 - **Default value**: `false`
787 - **Possible values**: `true`, `false`
792 fn lorem() -> usize {
796 fn lorem() -> usize {
805 fn lorem() -> usize { 42 }
807 fn lorem() -> usize {
813 See also [`control_brace_style`](#control_brace_style).
815 ## `force_explicit_abi`
817 Always print the abi for extern items
819 - **Default value**: `true`
820 - **Possible values**: `true`, `false`
822 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
828 pub static lorem: c_int;
836 pub static lorem: c_int;
840 ## `force_format_strings`
842 Always format string literals
844 - **Default value**: `false`
845 - **Possible values**: `true`, `false`
847 See [`format_strings`](#format_strings).
849 See also [`max_width`](#max_width).
853 Format string literals where necessary
855 - **Default value**: `false`
856 - **Possible values**: `true`, `false`
861 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
868 "ipsum dolor sit amet consectetur \
869 adipiscing elit lorem ipsum dolor sit";
872 See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
876 Indentation of generics
878 - **Default value**: `"Block"`
879 - **Possible values**: `"Block"`, `"Visual"`
889 Adipiscing: Eq = usize,
890 Consectetur: Eq = usize,
897 adipiscing: Adipiscing,
898 consectetur: Consectetur,
908 fn lorem<Ipsum: Eq = usize,
912 Adipiscing: Eq = usize,
913 Consectetur: Eq = usize,
919 adipiscing: Adipiscing,
920 consectetur: Consectetur,
929 Use tab characters for indentation, spaces for alignment
931 - **Default value**: `false`
932 - **Possible values**: `true`, `false`
937 fn lorem() -> usize {
938 42 // spaces before 42
945 fn lorem() -> usize {
950 See also: [`tab_spaces`](#tab_spaces).
952 ## `impl_empty_single_line`
954 Put empty-body implementations on a single line
956 - **Default value**: `true`
957 - **Possible values**: `true`, `false`
972 See also [`item_brace_style`](#item_brace_style).
974 ## `indent_match_arms`
976 Indent match arms instead of keeping them at the same indentation level as the match keyword
978 - **Default value**: `true`
979 - **Possible values**: `true`, `false`
1003 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1007 Indent style of imports
1009 - **Default Value**: `"Visual"`
1010 - **Possible values**: `"Block"`, `"Visual"`
1030 See also: [`imports_layout`](#imports_layout).
1034 Item layout inside a imports block
1036 - **Default value**: "Mixed"
1037 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
1042 use foo::{xxx, yyy, zzz};
1044 use foo::{aaa, bbb, ccc,
1050 **Note**: This option forces to put everything on one line and may exceeds `max_width`.
1053 use foo::{xxx, yyy, zzz};
1055 use foo::{aaa, bbb, ccc, ddd, eee, fff};
1058 #### `"HorizontalVertical"`
1061 use foo::{xxx, yyy, zzz};
1086 ## `item_brace_style`
1088 Brace style for structs and enums
1090 - **Default value**: `"SameLineWhere"`
1091 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
1093 #### `"AlwaysNextLine"`:
1108 #### `"PreferSameLine"`:
1121 #### `"SameLineWhere"`:
1135 ## `match_block_trailing_comma`
1137 Put a trailing comma after a block based match arm (non-block arms are not affected)
1139 - **Default value**: `false`
1140 - **Possible values**: `true`, `false`
1149 Lorem::Dolor => println!("dolor"),
1160 Lorem::Dolor => println!("dolor"),
1164 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1168 Maximum width of each line
1170 - **Default value**: `100`
1171 - **Possible values**: any positive integer
1173 See also [`error_on_line_overflow`](#error_on_line_overflow).
1177 Unix or Windows line endings
1179 - **Default value**: `"Unix"`
1180 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1182 ## `normalize_comments`
1184 Convert /* */ comments to // comments where possible
1186 - **Default value**: `false`
1187 - **Possible values**: `true`, `false`
1193 fn dolor() -> usize {}
1196 fn adipiscing() -> usize {}
1203 fn dolor() -> usize {}
1206 fn adipiscing() -> usize {}
1209 ## `reorder_imported_names`
1211 Reorder lists of names in import statements alphabetically
1213 - **Default value**: `false`
1214 - **Possible values**: `true`, `false`
1219 use super::{lorem, ipsum, dolor, sit};
1225 use super::{dolor, ipsum, lorem, sit};
1228 See also [`reorder_imports`](#reorder_imports).
1230 ## `reorder_imports`
1232 Reorder import statements alphabetically
1234 - **Default value**: `false`
1235 - **Possible values**: `true`, `false`
1255 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1257 ## `reorder_imports_in_group`
1259 Reorder import statements in group
1261 - **Default value**: `false`
1262 - **Possible values**: `true`, `false`
1264 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1290 See also [`reorder_imports`](#reorder_imports).
1292 ## `single_line_if_else_max_width`
1294 Maximum line length for single line if-else expressions.
1296 - **Default value**: `50`
1297 - **Possible values**: any positive integer
1299 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1301 #### Lines shorter than `single_line_if_else_max_width`:
1303 let lorem = if ipsum { dolor } else { sit };
1306 #### Lines longer than `single_line_if_else_max_width`:
1308 let lorem = if ipsum {
1315 See also: [`control_brace_style`](#control_brace_style).
1319 Don't reformat out of line modules
1321 - **Default value**: `false`
1322 - **Possible values**: `true`, `false`
1324 ## `space_after_bound_colon`
1326 Leave a space after the colon in a trait or lifetime bound
1328 - **Default value**: `true`
1329 - **Possible values**: `true`, `false`
1334 fn lorem<T:Eq>(t: T) {
1342 fn lorem<T: Eq>(t: T) {
1347 See also: [`space_before_bound`](#space_before_bound).
1349 ## `struct_field_align_threshold`
1351 The maximum diff of width between struct fields to be aligned with each other.
1353 - **Default value** : 0
1354 - **Possible values**: any positive integer
1376 ## `space_after_struct_lit_field_colon`
1378 Leave a space after the colon in a struct literal field
1380 - **Default value**: `true`
1381 - **Possible values**: `true`, `false`
1401 See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
1403 ## `space_after_type_annotation_colon`
1405 Leave a space after the colon in a type annotation
1407 - **Default value**: `true`
1408 - **Possible values**: `true`, `false`
1413 fn lorem<T: Eq>(t:T) {
1414 let ipsum:Dolor = sit;
1421 fn lorem<T: Eq>(t: T) {
1422 let ipsum: Dolor = sit;
1426 See also: [`space_before_type_annotation`](#space_before_type_annotation).
1428 ## `space_before_bound`
1430 Leave a space before the colon in a trait or lifetime bound
1432 - **Default value**: `false`
1433 - **Possible values**: `true`, `false`
1438 fn lorem<T: Eq>(t: T) {
1439 let ipsum: Dolor = sit;
1446 fn lorem<T : Eq>(t: T) {
1447 let ipsum: Dolor = sit;
1451 See also: [`space_after_bound_colon`](#space_after_bound_colon).
1453 ## `space_before_struct_lit_field_colon`
1455 Leave a space before the colon in a struct literal field
1457 - **Default value**: `false`
1458 - **Possible values**: `true`, `false`
1478 See also: [`space_after_struct_lit_field_colon`](#space_after_struct_lit_field_colon).
1480 ## `space_before_type_annotation`
1482 Leave a space before the colon in a type annotation
1484 - **Default value**: `false`
1485 - **Possible values**: `true`, `false`
1490 fn lorem<T: Eq>(t: T) {
1491 let ipsum: Dolor = sit;
1498 fn lorem<T: Eq>(t : T) {
1499 let ipsum : Dolor = sit;
1503 See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
1505 ## `spaces_around_ranges`
1507 Put spaces around the .. and ... range operators
1509 - **Default value**: `false`
1510 - **Possible values**: `true`, `false`
1521 let lorem = 0 .. 10;
1524 ## `spaces_within_angle_brackets`
1526 Put spaces within non-empty generic arguments
1528 - **Default value**: `false`
1529 - **Possible values**: `true`, `false`
1534 fn lorem<T: Eq>(t: T) {
1542 fn lorem< T: Eq >(t: T) {
1547 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1549 ## `spaces_within_parens`
1551 Put spaces within non-empty parentheses
1553 - **Default value**: `false`
1554 - **Possible values**: `true`, `false`
1559 fn lorem<T: Eq>(t: T) {
1560 let lorem = (ipsum, dolor);
1567 fn lorem<T: Eq>( t: T ) {
1568 let lorem = ( ipsum, dolor );
1572 See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1574 ## `spaces_within_square_brackets`
1576 Put spaces within non-empty square brackets
1578 - **Default value**: `false`
1579 - **Possible values**: `true`, `false`
1584 let lorem: [usize; 2] = [ipsum, dolor];
1590 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1593 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
1595 ## `struct_lit_multiline_style`
1597 Multiline style on literal structs
1599 - **Default value**: `"PreferSingle"`
1600 - **Possible values**: `"ForceMulti"`, `"PreferSingle"`
1602 #### `"ForceMulti"`:
1611 #### `"PreferSingle"`:
1614 let lorem = Lorem { ipsum: dolor, sit: amet };
1617 See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
1619 ## `struct_lit_style`
1621 Style of struct definition
1623 - **Default value**: `"Block"`
1624 - **Possible values**: `"Block"`, `"Visual"`
1638 let lorem = Lorem { ipsum: dolor,
1642 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1644 ## `struct_lit_width`
1646 Maximum width in the body of a struct lit before falling back to vertical formatting
1648 - **Default value**: `18`
1649 - **Possible values**: any positive integer
1651 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1653 #### Lines shorter than `struct_lit_width`:
1655 let lorem = Lorem { ipsum: dolor, sit: amet };
1658 #### Lines longer than `struct_lit_width`:
1659 See [`struct_lit_style`](#struct_lit_style).
1661 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1663 ## `struct_variant_width`
1665 Maximum width in the body of a struct variant before falling back to vertical formatting
1667 - **Default value**: `35`
1668 - **Possible values**: any positive integer
1670 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1672 #### Struct variants shorter than `struct_variant_width`:
1677 Sit { amet: Consectetur, adipiscing: Elit },
1681 #### Struct variants longer than `struct_variant_width`:
1695 Number of spaces per tab
1697 - **Default value**: `4`
1698 - **Possible values**: any positive integer
1704 let ipsum = dolor();
1706 "amet consectetur adipiscing elit."
1715 let ipsum = dolor();
1717 "amet consectetur adipiscing elit."
1722 See also: [`hard_tabs`](#hard_tabs).
1724 ## `take_source_hints`
1726 Retain some formatting characteristics from the source code
1728 - **Default value**: `false`
1729 - **Possible values**: `true`, `false`
1736 .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
1752 Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
1756 How to handle trailing commas for lists
1758 - **Default value**: `"Vertical"`
1759 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1764 let Lorem { ipsum, dolor, sit, } = amet;
1778 let Lorem { ipsum, dolor, sit } = amet;
1792 let Lorem { ipsum, dolor, sit } = amet;
1803 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1805 ## `trailing_semicolon`
1807 Add trailing semicolon after break, continue and return
1809 - **Default value**: `true`
1810 - **Possible values**: `true`, `false`
1826 ## `type_punctuation_density`
1828 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1830 - **Default value**: `"Wide"`
1831 - **Possible values**: `"Compressed"`, `"Wide"`
1833 #### `"Compressed"`:
1836 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1844 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1849 ## `use_try_shorthand`
1851 Replace uses of the try! macro by the ? shorthand
1853 - **Default value**: `false`
1854 - **Possible values**: `true`, `false`
1859 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1865 let lorem = ipsum.map(|dolor| dolor.sit())?;
1870 Density of a where clause.
1872 - **Default value**: `"CompressedIfEmpty"`
1873 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1875 #### `"Compressed"`:
1879 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1882 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1889 #### `"CompressedIfEmpty"`:
1893 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1896 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1909 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1913 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1922 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
1928 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1931 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1939 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1941 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1945 Element layout inside a where clause
1947 - **Default value**: `"Vertical"`
1948 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
1950 #### `"Horizontal"`:
1953 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1954 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1959 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1960 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1966 #### `"HorizontalVertical"`:
1969 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1970 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1975 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1976 where Ipsum: IpsumDolorSitAmet,
1977 Dolor: DolorSitAmetConsectetur,
1978 Sit: SitAmetConsecteturAdipiscing,
1979 Amet: AmetConsecteturAdipiscingElit
1988 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1989 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1994 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1995 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
1996 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
2005 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
2006 where Ipsum: IpsumDolorSitAmet,
2007 Dolor: DolorSitAmetConsectetur
2012 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
2013 where Ipsum: IpsumDolorSitAmet,
2014 Dolor: DolorSitAmetConsectetur,
2015 Sit: SitAmetConsecteturAdipiscing,
2016 Amet: AmetConsecteturAdipiscingElit
2022 **Note**: This option only takes effect when `where_style` is set to `"Legacy"`.
2024 See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
2026 ## `where_pred_indent`
2028 Indentation style of a where predicate
2030 - **Default value**: `"Visual"`
2031 - **Possible values**: `"Block"`, `"Visual"`
2036 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2049 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2059 **Note**: This option only takes effect when `where_style` is set to `"Legacy"`.
2061 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
2065 Overall strategy for where clauses
2067 - **Default value**: `"Rfc"`
2068 - **Possible values**: `"Rfc"`, `"Legacy"`
2073 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2087 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
2097 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
2101 Break comments to fit on the line
2103 - **Default value**: `false`
2104 - **Possible values**: `true`, `false`
2109 // 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.
2115 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
2116 // sed do eiusmod tempor incididunt ut labore et dolore
2117 // magna aliqua. Ut enim ad minim veniam, quis nostrud
2118 // exercitation ullamco laboris nisi ut aliquip ex ea
2119 // commodo consequat.
2122 ## `wrap_match_arms`
2124 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
2126 - **Default value**: `true`
2127 - **Possible values**: `true`, `false`
2134 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
2135 false => println!("{}", sit),
2144 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
2146 false => println!("{}", sit),
2150 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
2154 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
2156 - **Default value**: `"Overwrite"`
2157 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`