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**: `"Block"`
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");
169 ## `combine_control_expr`
171 Combine control expressions with function calls.
173 - **Default value**: `true`
174 - **Possible values**: `true`, `false`
188 foo!(if let Some(..) = x {
201 foo!(while let Some(..) = x {
227 Maximum length of comments. No effect unless`wrap_comments = true`.
229 - **Default value**: `80`
230 - **Possible values**: any positive integer
232 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
234 #### Comments shorter than `comment_width`:
236 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
239 #### Comments longer than `comment_width`:
241 // Lorem ipsum dolor sit amet,
242 // consectetur adipiscing elit.
245 See also [`wrap_comments`](#wrap_comments).
247 ## `condense_wildcard_suffixes`
249 Replace strings of _ wildcards by a single .. in tuple patterns
251 - **Default value**: `false`
252 - **Possible values**: `true`, `false`
257 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
263 let (lorem, ipsum, ..) = (1, 2, 3, 4);
268 Indent style for control flow statements
270 - **Default value**: `"Rfc"`
271 - **Possible values**: `"Rfc"`, `"Legacy"`
294 See also: [`control_brace_style`](#control_brace_style).
296 ## `control_brace_style`
298 Brace style for control flow constructs
300 - **Default value**: `"AlwaysSameLine"`
301 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
303 #### `"AlwaysNextLine"`:
316 #### `"AlwaysSameLine"`:
326 #### `"ClosingNextLine"`:
337 ## `disable_all_formatting`
339 Don't reformat anything
341 - **Default value**: `false`
342 - **Possible values**: `true`, `false`
344 ## `error_on_line_overflow`
346 Error if unable to get all lines within max_width
348 - **Default value**: `true`
349 - **Possible values**: `true`, `false`
351 See also [`max_width`](#max_width).
355 Argument density in functions
357 - **Default value**: `"Tall"`
358 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
364 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
366 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
370 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
371 adipiscing: Adipiscing, elit: Elit);
373 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
374 adipiscing: Adipiscing, elit: Elit) {
380 #### `"CompressedIfEmpty"`:
384 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
386 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
390 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
391 adipiscing: Adipiscing, elit: Elit);
393 fn lorem(ipsum: Ipsum,
397 consectetur: onsectetur,
398 adipiscing: Adipiscing,
409 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
411 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
415 fn lorem(ipsum: Ipsum,
419 consectetur: onsectetur,
420 adipiscing: Adipiscing,
423 fn lorem(ipsum: Ipsum,
427 consectetur: onsectetur,
428 adipiscing: Adipiscing,
439 fn lorem(ipsum: Ipsum,
444 fn lorem(ipsum: Ipsum,
451 fn lorem(ipsum: Ipsum,
455 consectetur: onsectetur,
456 adipiscing: Adipiscing,
459 fn lorem(ipsum: Ipsum,
463 consectetur: onsectetur,
464 adipiscing: Adipiscing,
473 Layout of function arguments and tuple structs
475 - **Default value**: `"Block"`
476 - **Possible values**: `"Block"`, `"Visual"`
483 fn lorem(ipsum: usize) {}
503 fn lorem(ipsum: usize) {}
505 fn lorem(ipsum: usize,
516 ## `fn_args_paren_newline`
518 If function argument parenthesis goes on a newline
520 - **Default value**: `false`
521 - **Possible values**: `true`, `false`
531 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
544 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
551 Brace style for functions
553 - **Default value**: `"SameLineWhere"`
554 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
556 #### `"AlwaysNextLine"`:
564 fn lorem(ipsum: usize)
569 fn lorem<T>(ipsum: T)
570 where T: Add + Sub + Mul + Div
576 #### `"PreferSameLine"`:
583 fn lorem(ipsum: usize) {
587 fn lorem<T>(ipsum: T)
588 where T: Add + Sub + Mul + Div {
593 #### `"SameLineWhere"`:
600 fn lorem(ipsum: usize) {
604 fn lorem<T>(ipsum: T)
605 where T: Add + Sub + Mul + Div
613 Indentation for function calls, etc.
615 - **Default value**: `"Block"`
616 - **Possible values**: `"Block"`, `"Visual"`
648 Maximum width of the args of a function call before falling back to vertical formatting
650 - **Default value**: `60`
651 - **Possible values**: any positive integer
653 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
655 #### Function call shorter than `fn_call_width`:
657 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
660 #### Function call longer than `fn_call_width`:
662 See [`fn_call_style`](#fn_call_style).
664 ## `fn_empty_single_line`
666 Put empty-body functions on a single line
668 - **Default value**: `true`
669 - **Possible values**: `true`, `false`
684 See also [`control_brace_style`](#control_brace_style).
686 ## `fn_return_indent`
688 Location of return type in function declaration
690 - **Default value**: `"WithArgs"`
691 - **Possible values**: `"WithArgs"`, `"WithWhereClause"`
696 fn lorem(ipsum: Ipsum,
700 consectetur: Consectetur,
701 adipiscing: Adipiscing)
710 #### `"WithWhereClause"`:
713 fn lorem(ipsum: Ipsum,
717 consectetur: Consectetur,
718 adipiscing: Adipiscing)
729 Put single-expression functions on a single line
731 - **Default value**: `false`
732 - **Possible values**: `true`, `false`
737 fn lorem() -> usize {
741 fn lorem() -> usize {
750 fn lorem() -> usize { 42 }
752 fn lorem() -> usize {
758 See also [`control_brace_style`](#control_brace_style).
760 ## `force_explicit_abi`
762 Always print the abi for extern items
764 - **Default value**: `true`
765 - **Possible values**: `true`, `false`
767 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
773 pub static lorem: c_int;
781 pub static lorem: c_int;
785 ## `force_format_strings`
787 Always format string literals
789 - **Default value**: `false`
790 - **Possible values**: `true`, `false`
792 See [`format_strings`](#format_strings).
794 See also [`max_width`](#max_width).
798 Format string literals where necessary
800 - **Default value**: `false`
801 - **Possible values**: `true`, `false`
806 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
813 "ipsum dolor sit amet consectetur \
814 adipiscing elit lorem ipsum dolor sit";
817 See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
821 Indentation of generics
823 - **Default value**: `"Block"`
824 - **Possible values**: `"Block"`, `"Visual"`
834 Adipiscing: Eq = usize,
835 Consectetur: Eq = usize,
841 adipiscing: Adipiscing,
842 consectetur: Consectetur,
852 fn lorem<Ipsum: Eq = usize,
856 Adipiscing: Eq = usize,
857 Consectetur: Eq = usize,
863 adipiscing: Adipiscing,
864 consectetur: Consectetur,
873 Use tab characters for indentation, spaces for alignment
875 - **Default value**: `false`
876 - **Possible values**: `true`, `false`
881 fn lorem() -> usize {
882 42 // spaces before 42
889 fn lorem() -> usize {
894 See also: [`tab_spaces`](#tab_spaces).
896 ## `impl_empty_single_line`
898 Put empty-body implementations on a single line
900 - **Default value**: `true`
901 - **Possible values**: `true`, `false`
916 See also [`item_brace_style`](#item_brace_style).
918 ## `indent_match_arms`
920 Indent match arms instead of keeping them at the same indentation level as the match keyword
922 - **Default value**: `true`
923 - **Possible values**: `true`, `false`
947 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
949 ## `item_brace_style`
951 Brace style for structs and enums
953 - **Default value**: `"SameLineWhere"`
954 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
956 #### `"AlwaysNextLine"`:
971 #### `"PreferSameLine"`:
984 #### `"SameLineWhere"`:
998 ## `match_block_trailing_comma`
1000 Put a trailing comma after a block based match arm (non-block arms are not affected)
1002 - **Default value**: `false`
1003 - **Possible values**: `true`, `false`
1012 Lorem::Dolor => println!("dolor"),
1023 Lorem::Dolor => println!("dolor"),
1027 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1031 Maximum width of each line
1033 - **Default value**: `100`
1034 - **Possible values**: any positive integer
1036 See also [`error_on_line_overflow`](#error_on_line_overflow).
1040 Unix or Windows line endings
1042 - **Default value**: `"Unix"`
1043 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1045 ## `normalize_comments`
1047 Convert /* */ comments to // comments where possible
1049 - **Default value**: `false`
1050 - **Possible values**: `true`, `false`
1056 fn dolor() -> usize {}
1059 fn adipiscing() -> usize {}
1066 fn dolor() -> usize {}
1069 fn adipiscing() -> usize {}
1072 ## `reorder_imported_names`
1074 Reorder lists of names in import statements alphabetically
1076 - **Default value**: `false`
1077 - **Possible values**: `true`, `false`
1082 use super::{lorem, ipsum, dolor, sit};
1088 use super::{dolor, ipsum, lorem, sit};
1091 See also [`reorder_imports`](#reorder_imports).
1093 ## `reorder_imports`
1095 Reorder import statements alphabetically
1097 - **Default value**: `false`
1098 - **Possible values**: `true`, `false`
1118 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1120 ## `reorder_imports_in_group`
1122 Reorder import statements in group
1124 - **Default value**: `false`
1125 - **Possible values**: `true`, `false`
1127 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1153 See also [`reorder_imports`](#reorder_imports).
1155 ## `single_line_if_else_max_width`
1157 Maximum line length for single line if-else expressions.
1159 - **Default value**: `50`
1160 - **Possible values**: any positive integer
1162 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1164 #### Lines shorter than `single_line_if_else_max_width`:
1166 let lorem = if ipsum { dolor } else { sit };
1169 #### Lines longer than `single_line_if_else_max_width`:
1171 let lorem = if ipsum {
1178 See also: [`control_brace_style`](#control_brace_style).
1182 Don't reformat out of line modules
1184 - **Default value**: `false`
1185 - **Possible values**: `true`, `false`
1187 ## `space_after_bound_colon`
1189 Leave a space after the colon in a trait or lifetime bound
1191 - **Default value**: `true`
1192 - **Possible values**: `true`, `false`
1197 fn lorem<T:Eq>(t: T) {
1205 fn lorem<T: Eq>(t: T) {
1210 See also: [`space_before_bound`](#space_before_bound).
1212 ## `space_after_struct_lit_field_colon`
1214 Leave a space after the colon in a struct literal field
1216 - **Default value**: `true`
1217 - **Possible values**: `true`, `false`
1237 See also: [`space_before_struct_lit_field_colon`](#space_before_struct_lit_field_colon).
1239 ## `space_after_type_annotation_colon`
1241 Leave a space after the colon in a type annotation
1243 - **Default value**: `true`
1244 - **Possible values**: `true`, `false`
1249 fn lorem<T: Eq>(t:T) {
1250 let ipsum:Dolor = sit;
1257 fn lorem<T: Eq>(t: T) {
1258 let ipsum: Dolor = sit;
1262 See also: [`space_before_type_annotation`](#space_before_type_annotation).
1264 ## `space_before_bound`
1266 Leave a space before the colon in a trait or lifetime bound
1268 - **Default value**: `false`
1269 - **Possible values**: `true`, `false`
1274 fn lorem<T: Eq>(t: T) {
1275 let ipsum: Dolor = sit;
1282 fn lorem<T : Eq>(t: T) {
1283 let ipsum: Dolor = sit;
1287 See also: [`space_after_bound_colon`](#space_after_bound_colon).
1289 ## `space_before_struct_lit_field_colon`
1291 Leave a space before the colon in a struct literal field
1293 - **Default value**: `false`
1294 - **Possible values**: `true`, `false`
1314 See also: [`space_after_struct_lit_field_colon`](#space_after_struct_lit_field_colon).
1316 ## `space_before_type_annotation`
1318 Leave a space before the colon in a type annotation
1320 - **Default value**: `false`
1321 - **Possible values**: `true`, `false`
1326 fn lorem<T: Eq>(t: T) {
1327 let ipsum: Dolor = sit;
1334 fn lorem<T: Eq>(t : T) {
1335 let ipsum : Dolor = sit;
1339 See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
1341 ## `spaces_around_ranges`
1343 Put spaces around the .. and ... range operators
1345 - **Default value**: `false`
1346 - **Possible values**: `true`, `false`
1357 let lorem = 0 .. 10;
1360 ## `spaces_within_angle_brackets`
1362 Put spaces within non-empty generic arguments
1364 - **Default value**: `false`
1365 - **Possible values**: `true`, `false`
1370 fn lorem<T: Eq>(t: T) {
1378 fn lorem< T: Eq >(t: T) {
1383 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1385 ## `spaces_within_parens`
1387 Put spaces within non-empty parentheses
1389 - **Default value**: `false`
1390 - **Possible values**: `true`, `false`
1395 fn lorem<T: Eq>(t: T) {
1396 let lorem = (ipsum, dolor);
1403 fn lorem<T: Eq>( t: T ) {
1404 let lorem = ( ipsum, dolor );
1408 See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1410 ## `spaces_within_square_brackets`
1412 Put spaces within non-empty square brackets
1414 - **Default value**: `false`
1415 - **Possible values**: `true`, `false`
1420 let lorem: [usize; 2] = [ipsum, dolor];
1426 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1429 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
1431 ## `struct_lit_multiline_style`
1433 Multiline style on literal structs
1435 - **Default value**: `"PreferSingle"`
1436 - **Possible values**: `"ForceMulti"`, `"PreferSingle"`
1438 #### `"ForceMulti"`:
1447 #### `"PreferSingle"`:
1450 let lorem = Lorem { ipsum: dolor, sit: amet };
1453 See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
1455 ## `struct_lit_style`
1457 Style of struct definition
1459 - **Default value**: `"Block"`
1460 - **Possible values**: `"Block"`, `"Visual"`
1474 let lorem = Lorem { ipsum: dolor,
1478 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1480 ## `struct_lit_width`
1482 Maximum width in the body of a struct lit before falling back to vertical formatting
1484 - **Default value**: `18`
1485 - **Possible values**: any positive integer
1487 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1489 #### Lines shorter than `struct_lit_width`:
1491 let lorem = Lorem { ipsum: dolor, sit: amet };
1494 #### Lines longer than `struct_lit_width`:
1495 See [`struct_lit_style`](#struct_lit_style).
1497 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1499 ## `struct_variant_width`
1501 Maximum width in the body of a struct variant before falling back to vertical formatting
1503 - **Default value**: `35`
1504 - **Possible values**: any positive integer
1506 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1508 #### Struct variants shorter than `struct_variant_width`:
1513 Sit { amet: Consectetur, adipiscing: Elit },
1517 #### Struct variants longer than `struct_variant_width`:
1531 Number of spaces per tab
1533 - **Default value**: `4`
1534 - **Possible values**: any positive integer
1540 let ipsum = dolor();
1542 "amet consectetur adipiscing elit."
1551 let ipsum = dolor();
1553 "amet consectetur adipiscing elit."
1558 See also: [`hard_tabs`](#hard_tabs).
1560 ## `take_source_hints`
1562 Retain some formatting characteristics from the source code
1564 - **Default value**: `false`
1565 - **Possible values**: `true`, `false`
1572 .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
1588 Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
1592 How to handle trailing commas for lists
1594 - **Default value**: `"Vertical"`
1595 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1600 let Lorem { ipsum, dolor, sit, } = amet;
1614 let Lorem { ipsum, dolor, sit } = amet;
1628 let Lorem { ipsum, dolor, sit } = amet;
1639 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1641 ## `type_punctuation_density`
1643 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1645 - **Default value**: `"Wide"`
1646 - **Possible values**: `"Compressed"`, `"Wide"`
1648 #### `"Compressed"`:
1651 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1659 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1664 ## `use_try_shorthand`
1666 Replace uses of the try! macro by the ? shorthand
1668 - **Default value**: `false`
1669 - **Possible values**: `true`, `false`
1674 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1680 let lorem = ipsum.map(|dolor| dolor.sit())?;
1685 Density of a where clause
1687 - **Default value**: `"CompressedIfEmpty"`
1688 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1690 #### `"Compressed"`:
1694 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1696 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
1702 #### `"CompressedIfEmpty"`:
1706 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1708 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1720 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1723 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1731 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
1737 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1740 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1748 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1750 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1754 Element layout inside a where clause
1756 - **Default value**: `"Vertical"`
1757 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
1759 #### `"Horizontal"`:
1762 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1763 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1768 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1769 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1775 #### `"HorizontalVertical"`:
1778 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1779 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1784 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1785 where Ipsum: IpsumDolorSitAmet,
1786 Dolor: DolorSitAmetConsectetur,
1787 Sit: SitAmetConsecteturAdipiscing,
1788 Amet: AmetConsecteturAdipiscingElit
1797 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1798 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1803 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1804 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
1805 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1814 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1815 where Ipsum: IpsumDolorSitAmet,
1816 Dolor: DolorSitAmetConsectetur
1821 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1822 where Ipsum: IpsumDolorSitAmet,
1823 Dolor: DolorSitAmetConsectetur,
1824 Sit: SitAmetConsecteturAdipiscing,
1825 Amet: AmetConsecteturAdipiscingElit
1831 See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1833 ## `where_pred_indent`
1835 Indentation style of a where predicate
1837 - **Default value**: `"Visual"`
1838 - **Possible values**: `"Block"`, `"Visual"`
1843 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1856 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1866 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
1870 Overall strategy for where clauses
1872 - **Default value**: `"Rfc"`
1873 - **Possible values**: `"Rfc"`, `"Legacy"`
1878 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1892 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1902 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
1906 Break comments to fit on the line
1908 - **Default value**: `false`
1909 - **Possible values**: `true`, `false`
1914 // 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.
1920 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
1921 // sed do eiusmod tempor incididunt ut labore et dolore
1922 // magna aliqua. Ut enim ad minim veniam, quis nostrud
1923 // exercitation ullamco laboris nisi ut aliquip ex ea
1924 // commodo consequat.
1927 ## `wrap_match_arms`
1929 Wrap multiline match arms in blocks
1931 - **Default value**: `true`
1932 - **Possible values**: `true`, `false`
1940 println!("{}", ipsum);
1954 println!("{}", ipsum);
1956 false => println!("{}", sit),
1960 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
1964 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
1966 - **Default value**: `"Replace"`
1967 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`