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:
21 - **Default value**: `"Visual"`
22 - **Possible values**: `"Block"`, `"Visual"`
41 let lorem = vec!["ipsum",
52 Maximum width of an array literal before falling back to vertical formatting
54 - **Default value**: `60`
55 - **Possible values**: any positive integer
57 **Note:** A value of `0` results in [`array_layout`](#array_layout) being applied regardless of a line's width.
59 #### Lines shorter than `array_width`:
62 vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
65 #### Lines longer than `array_width`:
66 See [`array_layout`](#array_layout).
72 - **Default value**: `"Block"`
73 - **Possible values**: `"Block"`, `"Visual"`
90 let lorem = ipsum.dolor()
98 See also [`chain_one_line_max`](#chain_one_line_max).
100 ## `chain_one_line_max`
102 Maximum length of a chain to fit on a single line
104 - **Default value**: `60`
105 - **Possible values**: any positive integer
107 #### Lines shorter than `chain_one_line_max`:
109 let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
112 #### Lines longer than `chain_one_line_max`:
113 See [`chain_indent`](#chain_indent).
115 ## `chain_split_single_child`
117 Split a chain with a single child if its length exceeds [`chain_one_line_max`](#chain_one_line_max).
119 - **Default value**: `false`
120 - **Possible values**: `false`, `true`
125 let files = fs::read_dir("tests/coverage/source").expect("Couldn't read source dir");
131 let files = fs::read_dir("tests/coverage/source")
132 .expect("Couldn't read source dir");
135 See also [`chain_one_line_max`](#chain_one_line_max).
137 ## `closure_block_indent_threshold`
139 How many lines a closure must have before it is block indented. -1 means never use block indent.
141 - **Default value**: `7`
142 - **Possible values**: `-1`, or any positive integer
144 #### Closures shorter than `closure_block_indent_threshold`:
155 #### Closures longer than `closure_block_indent_threshold`:
163 println!("consectetur");
164 println!("adipiscing");
171 Maximum length of comments. No effect unless`wrap_comments = true`.
173 - **Default value**: `80`
174 - **Possible values**: any positive integer
176 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
178 #### Comments shorter than `comment_width`:
180 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
183 #### Comments longer than `comment_width`:
185 // Lorem ipsum dolor sit amet,
186 // consectetur adipiscing elit.
189 See also [`wrap_comments`](#wrap_comments).
191 ## `condense_wildcard_suffixes`
193 Replace strings of _ wildcards by a single .. in tuple patterns
195 - **Default value**: `false`
196 - **Possible values**: `true`, `false`
201 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
207 let (lorem, ipsum, ..) = (1, 2, 3, 4);
210 ## `control_brace_style`
212 Brace style for control flow constructs
214 - **Default value**: `"AlwaysSameLine"`
215 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
217 #### `"AlwaysNextLine"`:
230 #### `"AlwaysSameLine"`:
240 #### `"ClosingNextLine"`:
251 ## `disable_all_formatting`
253 Don't reformat anything
255 - **Default value**: `false`
256 - **Possible values**: `true`, `false`
258 ## `error_on_line_overflow`
260 Error if unable to get all lines within max_width
262 - **Default value**: `true`
263 - **Possible values**: `true`, `false`
265 See also [`max_width`](#max_width).
269 Argument density in functions
271 - **Default value**: `"Tall"`
272 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
278 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
280 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
284 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
285 adipiscing: Adipiscing, elit: Elit);
287 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
288 adipiscing: Adipiscing, elit: Elit) {
294 #### `"CompressedIfEmpty"`:
298 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
300 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
304 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
305 adipiscing: Adipiscing, elit: Elit);
307 fn lorem(ipsum: Ipsum,
311 consectetur: onsectetur,
312 adipiscing: Adipiscing,
323 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
325 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
329 fn lorem(ipsum: Ipsum,
333 consectetur: onsectetur,
334 adipiscing: Adipiscing,
337 fn lorem(ipsum: Ipsum,
341 consectetur: onsectetur,
342 adipiscing: Adipiscing,
353 fn lorem(ipsum: Ipsum,
358 fn lorem(ipsum: Ipsum,
365 fn lorem(ipsum: Ipsum,
369 consectetur: onsectetur,
370 adipiscing: Adipiscing,
373 fn lorem(ipsum: Ipsum,
377 consectetur: onsectetur,
378 adipiscing: Adipiscing,
387 Layout of function arguments and tuple structs
389 - **Default value**: `"Visual"`
390 - **Possible values**: `"Block"`, `"Visual"`
397 fn lorem(ipsum: usize) {}
417 fn lorem(ipsum: usize) {}
419 fn lorem(ipsum: usize,
430 ## `fn_args_paren_newline`
432 If function argument parenthesis goes on a newline
434 - **Default value**: `true`
435 - **Possible values**: `true`, `false`
445 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
458 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
465 Brace style for functions
467 - **Default value**: `"SameLineWhere"`
468 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
470 #### `"AlwaysNextLine"`:
478 fn lorem(ipsum: usize)
483 fn lorem<T>(ipsum: T)
484 where T: Add + Sub + Mul + Div
490 #### `"PreferSameLine"`:
497 fn lorem(ipsum: usize) {
501 fn lorem<T>(ipsum: T)
502 where T: Add + Sub + Mul + Div {
507 #### `"SameLineWhere"`:
514 fn lorem(ipsum: usize) {
518 fn lorem<T>(ipsum: T)
519 where T: Add + Sub + Mul + Div
527 Indentation for function calls, etc.
529 - **Default value**: `"Visual"`
530 - **Possible values**: `"Block"`, `"Visual"`
562 Maximum width of the args of a function call before falling back to vertical formatting
564 - **Default value**: `60`
565 - **Possible values**: any positive integer
567 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
569 #### Function call shorter than `fn_call_width`:
571 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
574 #### Function call longer than `fn_call_width`:
576 See [`fn_call_style`](#fn_call_style).
578 ## `fn_empty_single_line`
580 Put empty-body functions on a single line
582 - **Default value**: `true`
583 - **Possible values**: `true`, `false`
598 See also [`control_brace_style`](#control_brace_style).
600 ## `fn_return_indent`
602 Location of return type in function declaration
604 - **Default value**: `"WithArgs"`
605 - **Possible values**: `"WithArgs"`, `"WithWhereClause"`
610 fn lorem(ipsum: Ipsum,
614 consectetur: Consectetur,
615 adipiscing: Adipiscing)
624 #### `"WithWhereClause"`:
627 fn lorem(ipsum: Ipsum,
631 consectetur: Consectetur,
632 adipiscing: Adipiscing)
643 Put single-expression functions on a single line
645 - **Default value**: `false`
646 - **Possible values**: `true`, `false`
651 fn lorem() -> usize {
655 fn lorem() -> usize {
664 fn lorem() -> usize { 42 }
666 fn lorem() -> usize {
672 See also [`control_brace_style`](#control_brace_style).
674 ## `force_explicit_abi`
676 Always print the abi for extern items
678 - **Default value**: `true`
679 - **Possible values**: `true`, `false`
681 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
687 pub static lorem: c_int;
695 pub static lorem: c_int;
699 ## `force_format_strings`
701 Always format string literals
703 - **Default value**: `false`
704 - **Possible values**: `true`, `false`
706 See [`format_strings`](#format_strings).
708 See also [`max_width`](#max_width).
712 Format string literals where necessary
714 - **Default value**: `false`
715 - **Possible values**: `true`, `false`
720 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
727 "ipsum dolor sit amet consectetur \
728 adipiscing elit lorem ipsum dolor sit";
731 See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
735 Indentation of generics
737 - **Default value**: `"Visual"`
738 - **Possible values**: `"Block"`, `"Visual"`
748 Adipiscing: Eq = usize,
749 Consectetur: Eq = usize,
755 adipiscing: Adipiscing,
756 consectetur: Consectetur,
766 fn lorem<Ipsum: Eq = usize,
770 Adipiscing: Eq = usize,
771 Consectetur: Eq = usize,
777 adipiscing: Adipiscing,
778 consectetur: Consectetur,
787 Use tab characters for indentation, spaces for alignment
789 - **Default value**: `false`
790 - **Possible values**: `true`, `false`
795 fn lorem() -> usize {
796 42 // spaces before 42
803 fn lorem() -> usize {
808 See also: [`tab_spaces`](#tab_spaces).
810 ## `impl_empty_single_line`
812 Put empty-body implementations on a single line
814 - **Default value**: `true`
815 - **Possible values**: `true`, `false`
830 See also [`item_brace_style`](#item_brace_style).
832 ## `indent_match_arms`
834 Indent match arms instead of keeping them at the same indentation level as the match keyword
836 - **Default value**: `true`
837 - **Possible values**: `true`, `false`
861 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
863 ## `item_brace_style`
865 Brace style for structs and enums
867 - **Default value**: `"SameLineWhere"`
868 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
870 #### `"AlwaysNextLine"`:
885 #### `"PreferSameLine"`:
898 #### `"SameLineWhere"`:
912 ## `match_block_trailing_comma`
914 Put a trailing comma after a block based match arm (non-block arms are not affected)
916 - **Default value**: `false`
917 - **Possible values**: `true`, `false`
926 Lorem::Dolor => println!("dolor"),
937 Lorem::Dolor => println!("dolor"),
941 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
945 Maximum width of each line
947 - **Default value**: `100`
948 - **Possible values**: any positive integer
950 See also [`error_on_line_overflow`](#error_on_line_overflow).
954 Unix or Windows line endings
956 - **Default value**: `"Unix"`
957 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
959 ## `normalize_comments`
961 Convert /* */ comments to // comments where possible
963 - **Default value**: `false`
964 - **Possible values**: `true`, `false`
970 fn dolor() -> usize {}
973 fn adipiscing() -> usize {}
980 fn dolor() -> usize {}
983 fn adipiscing() -> usize {}
986 ## `reorder_imported_names`
988 Reorder lists of names in import statements alphabetically
990 - **Default value**: `false`
991 - **Possible values**: `true`, `false`
996 use super::{lorem, ipsum, dolor, sit};
1002 use super::{dolor, ipsum, lorem, sit};
1005 See also [`reorder_imports`](#reorder_imports).
1007 ## `reorder_imports`
1009 Reorder import statements alphabetically
1011 - **Default value**: `false`
1012 - **Possible values**: `true`, `false`
1032 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1034 ## `reorder_imports_in_group`
1036 Reorder import statements in group
1038 - **Default value**: `false`
1039 - **Possible values**: `true`, `false`
1041 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1067 See also [`reorder_imports`](#reorder_imports).
1069 ## `single_line_if_else_max_width`
1071 Maximum line length for single line if-else expressions.
1073 - **Default value**: `50`
1074 - **Possible values**: any positive integer
1076 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1078 #### Lines shorter than `single_line_if_else_max_width`:
1080 let lorem = if ipsum { dolor } else { sit };
1083 #### Lines longer than `single_line_if_else_max_width`:
1085 let lorem = if ipsum {
1092 See also: [`control_brace_style`](#control_brace_style).
1096 Don't reformat out of line modules
1098 - **Default value**: `false`
1099 - **Possible values**: `true`, `false`
1101 ## `space_after_bound_colon`
1103 Leave a space after the colon in a trait or lifetime bound
1105 - **Default value**: `true`
1106 - **Possible values**: `true`, `false`
1111 fn lorem<T:Eq>(t: T) {
1119 fn lorem<T: Eq>(t: T) {
1124 See also: [`space_before_bound`](#space_before_bound).
1126 ## `space_after_struct_lit_field_colon`
1128 Leave a space after the colon in a struct literal field
1130 - **Default value**: `true`
1131 - **Possible values**: `true`, `false`
1151 See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
1153 ## `space_after_type_annotation_colon`
1155 Leave a space after the colon in a type annotation
1157 - **Default value**: `true`
1158 - **Possible values**: `true`, `false`
1163 fn lorem<T: Eq>(t:T) {
1164 let ipsum:Dolor = sit;
1171 fn lorem<T: Eq>(t: T) {
1172 let ipsum: Dolor = sit;
1176 See also: [`space_before_type_annotation`](#space_before_type_annotation).
1178 ## `space_before_bound`
1180 Leave a space before the colon in a trait or lifetime bound
1182 - **Default value**: `false`
1183 - **Possible values**: `true`, `false`
1188 fn lorem<T: Eq>(t: T) {
1189 let ipsum: Dolor = sit;
1196 fn lorem<T : Eq>(t: T) {
1197 let ipsum: Dolor = sit;
1201 See also: [`space_after_bound_colon`](#space_after_bound_colon).
1203 ## `space_before_struct_lit_field_colon`
1205 Leave a space before the colon in a struct literal field
1207 - **Default value**: `true`
1208 - **Possible values**: `true`, `false`
1228 See also: [`space_after_struct_lit_field_colon`](#space_after_struct_lit_field_colon).
1230 ## `space_before_type_annotation`
1232 Leave a space before the colon in a type annotation
1234 - **Default value**: `false`
1235 - **Possible values**: `true`, `false`
1240 fn lorem<T: Eq>(t: T) {
1241 let ipsum: Dolor = sit;
1248 fn lorem<T: Eq>(t : T) {
1249 let ipsum : Dolor = sit;
1253 See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
1255 ## `spaces_around_ranges`
1257 Put spaces around the .. and ... range operators
1259 - **Default value**: `false`
1260 - **Possible values**: `true`, `false`
1271 let lorem = 0 .. 10;
1274 ## `spaces_within_angle_brackets`
1276 Put spaces within non-empty generic arguments
1278 - **Default value**: `false`
1279 - **Possible values**: `true`, `false`
1284 fn lorem<T: Eq>(t: T) {
1292 fn lorem< T: Eq >(t: T) {
1297 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1299 ## `spaces_within_parens`
1301 Put spaces within non-empty parentheses
1303 - **Default value**: `false`
1304 - **Possible values**: `true`, `false`
1309 fn lorem<T: Eq>(t: T) {
1310 let lorem = (ipsum, dolor);
1317 fn lorem<T: Eq>( t: T ) {
1318 let lorem = ( ipsum, dolor );
1322 See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1324 ## `spaces_within_square_brackets`
1326 Put spaces within non-empty square brackets
1328 - **Default value**: `false`
1329 - **Possible values**: `true`, `false`
1334 let lorem: [usize; 2] = [ipsum, dolor];
1340 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1343 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
1345 ## `struct_lit_multiline_style`
1347 Multiline style on literal structs
1349 - **Default value**: `"PreferSingle"`
1350 - **Possible values**: `"ForceMulti"`, `"PreferSingle"`
1352 #### `"ForceMulti"`:
1361 #### `"PreferSingle"`:
1364 let lorem = Lorem { ipsum: dolor, sit: amet };
1367 See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
1369 ## `struct_lit_style`
1371 Style of struct definition
1373 - **Default value**: `"Block"`
1374 - **Possible values**: `"Block"`, `"Visual"`
1388 let lorem = Lorem { ipsum: dolor,
1392 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1394 ## `struct_lit_width`
1396 Maximum width in the body of a struct lit before falling back to vertical formatting
1398 - **Default value**: `18`
1399 - **Possible values**: any positive integer
1401 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1403 #### Lines shorter than `struct_lit_width`:
1405 let lorem = Lorem { ipsum: dolor, sit: amet };
1408 #### Lines longer than `struct_lit_width`:
1409 See [`struct_lit_style`](#struct_lit_style).
1411 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1413 ## `struct_variant_width`
1415 Maximum width in the body of a struct variant before falling back to vertical formatting
1417 - **Default value**: `35`
1418 - **Possible values**: any positive integer
1420 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1422 #### Struct variants shorter than `struct_variant_width`:
1427 Sit { amet: Consectetur, adipiscing: Elit },
1431 #### Struct variants longer than `struct_variant_width`:
1445 Number of spaces per tab
1447 - **Default value**: `4`
1448 - **Possible values**: any positive integer
1454 let ipsum = dolor();
1456 "amet consectetur adipiscing elit."
1465 let ipsum = dolor();
1467 "amet consectetur adipiscing elit."
1472 See also: [`hard_tabs`](#hard_tabs).
1474 ## `take_source_hints`
1476 Retain some formatting characteristics from the source code
1478 - **Default value**: `false`
1479 - **Possible values**: `true`, `false`
1486 .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
1502 Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
1506 How to handle trailing commas for lists
1508 - **Default value**: `"Vertical"`
1509 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1514 let Lorem { ipsum, dolor, sit, } = amet;
1528 let Lorem { ipsum, dolor, sit } = amet;
1542 let Lorem { ipsum, dolor, sit } = amet;
1553 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1555 ## `type_punctuation_density`
1557 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1559 - **Default value**: `"Wide"`
1560 - **Possible values**: `"Compressed"`, `"Wide"`
1562 #### `"Compressed"`:
1565 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1573 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1578 ## `use_try_shorthand`
1580 Replace uses of the try! macro by the ? shorthand
1582 - **Default value**: `false`
1583 - **Possible values**: `true`, `false`
1588 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1594 let lorem = ipsum.map(|dolor| dolor.sit())?;
1599 Density of a where clause
1601 - **Default value**: `"CompressedIfEmpty"`
1602 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1604 #### `"Compressed"`:
1608 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1610 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
1616 #### `"CompressedIfEmpty"`:
1620 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1622 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1634 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1637 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1645 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
1651 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1654 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1662 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1664 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1668 Element layout inside a where clause
1670 - **Default value**: `"Vertical"`
1671 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
1673 #### `"Horizontal"`:
1676 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1677 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1682 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1683 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1689 #### `"HorizontalVertical"`:
1692 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1693 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1698 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1699 where Ipsum: IpsumDolorSitAmet,
1700 Dolor: DolorSitAmetConsectetur,
1701 Sit: SitAmetConsecteturAdipiscing,
1702 Amet: AmetConsecteturAdipiscingElit
1711 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1712 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1717 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1718 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
1719 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1728 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1729 where Ipsum: IpsumDolorSitAmet,
1730 Dolor: DolorSitAmetConsectetur
1735 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1736 where Ipsum: IpsumDolorSitAmet,
1737 Dolor: DolorSitAmetConsectetur,
1738 Sit: SitAmetConsecteturAdipiscing,
1739 Amet: AmetConsecteturAdipiscingElit
1745 See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1747 ## `where_pred_indent`
1749 Indentation style of a where predicate
1751 - **Default value**: `"Visual"`
1752 - **Possible values**: `"Block"`, `"Visual"`
1757 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1770 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1780 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
1784 Overall strategy for where clauses
1786 - **Default value**: `"Default"`
1787 - **Possible values**: `"Default"`, `"Rfc"`
1792 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1805 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1816 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
1820 Break comments to fit on the line
1822 - **Default value**: `false`
1823 - **Possible values**: `true`, `false`
1828 // 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.
1834 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
1835 // sed do eiusmod tempor incididunt ut labore et dolore
1836 // magna aliqua. Ut enim ad minim veniam, quis nostrud
1837 // exercitation ullamco laboris nisi ut aliquip ex ea
1838 // commodo consequat.
1841 ## `wrap_match_arms`
1843 Wrap multiline match arms in blocks
1845 - **Default value**: `true`
1846 - **Possible values**: `true`, `false`
1854 println!("{}", ipsum);
1868 println!("{}", ipsum);
1870 false => println!("{}", sit),
1874 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
1878 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
1880 - **Default value**: `"Replace"`
1881 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`