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");
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);
266 ## `control_brace_style`
268 Brace style for control flow constructs
270 - **Default value**: `"AlwaysSameLine"`
271 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
273 #### `"AlwaysNextLine"`:
286 #### `"AlwaysSameLine"`:
296 #### `"ClosingNextLine"`:
307 ## `disable_all_formatting`
309 Don't reformat anything
311 - **Default value**: `false`
312 - **Possible values**: `true`, `false`
314 ## `error_on_line_overflow`
316 Error if unable to get all lines within max_width
318 - **Default value**: `true`
319 - **Possible values**: `true`, `false`
321 See also [`max_width`](#max_width).
325 Argument density in functions
327 - **Default value**: `"Tall"`
328 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
334 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
336 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
340 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
341 adipiscing: Adipiscing, elit: Elit);
343 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
344 adipiscing: Adipiscing, elit: Elit) {
350 #### `"CompressedIfEmpty"`:
354 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
356 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
360 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
361 adipiscing: Adipiscing, elit: Elit);
363 fn lorem(ipsum: Ipsum,
367 consectetur: onsectetur,
368 adipiscing: Adipiscing,
379 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
381 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
385 fn lorem(ipsum: Ipsum,
389 consectetur: onsectetur,
390 adipiscing: Adipiscing,
393 fn lorem(ipsum: Ipsum,
397 consectetur: onsectetur,
398 adipiscing: Adipiscing,
409 fn lorem(ipsum: Ipsum,
414 fn lorem(ipsum: Ipsum,
421 fn lorem(ipsum: Ipsum,
425 consectetur: onsectetur,
426 adipiscing: Adipiscing,
429 fn lorem(ipsum: Ipsum,
433 consectetur: onsectetur,
434 adipiscing: Adipiscing,
443 Layout of function arguments and tuple structs
445 - **Default value**: `"Visual"`
446 - **Possible values**: `"Block"`, `"Visual"`
453 fn lorem(ipsum: usize) {}
473 fn lorem(ipsum: usize) {}
475 fn lorem(ipsum: usize,
486 ## `fn_args_paren_newline`
488 If function argument parenthesis goes on a newline
490 - **Default value**: `true`
491 - **Possible values**: `true`, `false`
501 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
514 -> DolorSitAmetConsecteturAdipiscingElitLoremIpsumDolorSitAmetConsecteturAdipiscingElit {
521 Brace style for functions
523 - **Default value**: `"SameLineWhere"`
524 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
526 #### `"AlwaysNextLine"`:
534 fn lorem(ipsum: usize)
539 fn lorem<T>(ipsum: T)
540 where T: Add + Sub + Mul + Div
546 #### `"PreferSameLine"`:
553 fn lorem(ipsum: usize) {
557 fn lorem<T>(ipsum: T)
558 where T: Add + Sub + Mul + Div {
563 #### `"SameLineWhere"`:
570 fn lorem(ipsum: usize) {
574 fn lorem<T>(ipsum: T)
575 where T: Add + Sub + Mul + Div
583 Indentation for function calls, etc.
585 - **Default value**: `"Visual"`
586 - **Possible values**: `"Block"`, `"Visual"`
618 Maximum width of the args of a function call before falling back to vertical formatting
620 - **Default value**: `60`
621 - **Possible values**: any positive integer
623 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
625 #### Function call shorter than `fn_call_width`:
627 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
630 #### Function call longer than `fn_call_width`:
632 See [`fn_call_style`](#fn_call_style).
634 ## `fn_empty_single_line`
636 Put empty-body functions on a single line
638 - **Default value**: `true`
639 - **Possible values**: `true`, `false`
654 See also [`control_brace_style`](#control_brace_style).
656 ## `fn_return_indent`
658 Location of return type in function declaration
660 - **Default value**: `"WithArgs"`
661 - **Possible values**: `"WithArgs"`, `"WithWhereClause"`
666 fn lorem(ipsum: Ipsum,
670 consectetur: Consectetur,
671 adipiscing: Adipiscing)
680 #### `"WithWhereClause"`:
683 fn lorem(ipsum: Ipsum,
687 consectetur: Consectetur,
688 adipiscing: Adipiscing)
699 Put single-expression functions on a single line
701 - **Default value**: `false`
702 - **Possible values**: `true`, `false`
707 fn lorem() -> usize {
711 fn lorem() -> usize {
720 fn lorem() -> usize { 42 }
722 fn lorem() -> usize {
728 See also [`control_brace_style`](#control_brace_style).
730 ## `force_explicit_abi`
732 Always print the abi for extern items
734 - **Default value**: `true`
735 - **Possible values**: `true`, `false`
737 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
743 pub static lorem: c_int;
751 pub static lorem: c_int;
755 ## `force_format_strings`
757 Always format string literals
759 - **Default value**: `false`
760 - **Possible values**: `true`, `false`
762 See [`format_strings`](#format_strings).
764 See also [`max_width`](#max_width).
768 Format string literals where necessary
770 - **Default value**: `false`
771 - **Possible values**: `true`, `false`
776 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
783 "ipsum dolor sit amet consectetur \
784 adipiscing elit lorem ipsum dolor sit";
787 See also [`force_format_strings`](#force_format_strings), [`max_width`](#max_width).
791 Indentation of generics
793 - **Default value**: `"Visual"`
794 - **Possible values**: `"Block"`, `"Visual"`
804 Adipiscing: Eq = usize,
805 Consectetur: Eq = usize,
811 adipiscing: Adipiscing,
812 consectetur: Consectetur,
822 fn lorem<Ipsum: Eq = usize,
826 Adipiscing: Eq = usize,
827 Consectetur: Eq = usize,
833 adipiscing: Adipiscing,
834 consectetur: Consectetur,
843 Use tab characters for indentation, spaces for alignment
845 - **Default value**: `false`
846 - **Possible values**: `true`, `false`
851 fn lorem() -> usize {
852 42 // spaces before 42
859 fn lorem() -> usize {
864 See also: [`tab_spaces`](#tab_spaces).
866 ## `impl_empty_single_line`
868 Put empty-body implementations on a single line
870 - **Default value**: `true`
871 - **Possible values**: `true`, `false`
886 See also [`item_brace_style`](#item_brace_style).
888 ## `indent_match_arms`
890 Indent match arms instead of keeping them at the same indentation level as the match keyword
892 - **Default value**: `true`
893 - **Possible values**: `true`, `false`
917 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
919 ## `item_brace_style`
921 Brace style for structs and enums
923 - **Default value**: `"SameLineWhere"`
924 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
926 #### `"AlwaysNextLine"`:
941 #### `"PreferSameLine"`:
954 #### `"SameLineWhere"`:
968 ## `match_block_trailing_comma`
970 Put a trailing comma after a block based match arm (non-block arms are not affected)
972 - **Default value**: `false`
973 - **Possible values**: `true`, `false`
982 Lorem::Dolor => println!("dolor"),
993 Lorem::Dolor => println!("dolor"),
997 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1001 Maximum width of each line
1003 - **Default value**: `100`
1004 - **Possible values**: any positive integer
1006 See also [`error_on_line_overflow`](#error_on_line_overflow).
1010 Unix or Windows line endings
1012 - **Default value**: `"Unix"`
1013 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1015 ## `normalize_comments`
1017 Convert /* */ comments to // comments where possible
1019 - **Default value**: `false`
1020 - **Possible values**: `true`, `false`
1026 fn dolor() -> usize {}
1029 fn adipiscing() -> usize {}
1036 fn dolor() -> usize {}
1039 fn adipiscing() -> usize {}
1042 ## `reorder_imported_names`
1044 Reorder lists of names in import statements alphabetically
1046 - **Default value**: `false`
1047 - **Possible values**: `true`, `false`
1052 use super::{lorem, ipsum, dolor, sit};
1058 use super::{dolor, ipsum, lorem, sit};
1061 See also [`reorder_imports`](#reorder_imports).
1063 ## `reorder_imports`
1065 Reorder import statements alphabetically
1067 - **Default value**: `false`
1068 - **Possible values**: `true`, `false`
1088 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1090 ## `reorder_imports_in_group`
1092 Reorder import statements in group
1094 - **Default value**: `false`
1095 - **Possible values**: `true`, `false`
1097 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1123 See also [`reorder_imports`](#reorder_imports).
1125 ## `single_line_if_else_max_width`
1127 Maximum line length for single line if-else expressions.
1129 - **Default value**: `50`
1130 - **Possible values**: any positive integer
1132 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1134 #### Lines shorter than `single_line_if_else_max_width`:
1136 let lorem = if ipsum { dolor } else { sit };
1139 #### Lines longer than `single_line_if_else_max_width`:
1141 let lorem = if ipsum {
1148 See also: [`control_brace_style`](#control_brace_style).
1152 Don't reformat out of line modules
1154 - **Default value**: `false`
1155 - **Possible values**: `true`, `false`
1157 ## `space_after_bound_colon`
1159 Leave a space after the colon in a trait or lifetime bound
1161 - **Default value**: `true`
1162 - **Possible values**: `true`, `false`
1167 fn lorem<T:Eq>(t: T) {
1175 fn lorem<T: Eq>(t: T) {
1180 See also: [`space_before_bound`](#space_before_bound).
1182 ## `space_after_type_annotation_colon`
1184 Leave a space after the colon in a type annotation
1186 - **Default value**: `true`
1187 - **Possible values**: `true`, `false`
1192 fn lorem<T: Eq>(t:T) {
1193 let ipsum:Dolor = sit;
1200 fn lorem<T: Eq>(t: T) {
1201 let ipsum: Dolor = sit;
1205 See also: [`space_before_type_annotation`](#space_before_type_annotation).
1207 ## `space_before_bound`
1209 Leave a space before the colon in a trait or lifetime bound
1211 - **Default value**: `false`
1212 - **Possible values**: `true`, `false`
1217 fn lorem<T: Eq>(t: T) {
1218 let ipsum: Dolor = sit;
1225 fn lorem<T : Eq>(t: T) {
1226 let ipsum: Dolor = sit;
1230 See also: [`space_after_bound_colon`](#space_after_bound_colon).
1232 ## `space_before_type_annotation`
1234 Leave a space before the colon in a type annotation
1236 - **Default value**: `false`
1237 - **Possible values**: `true`, `false`
1242 fn lorem<T: Eq>(t: T) {
1243 let ipsum: Dolor = sit;
1250 fn lorem<T: Eq>(t : T) {
1251 let ipsum : Dolor = sit;
1255 See also: [`space_after_type_annotation_colon`](#space_after_type_annotation_colon).
1257 ## `spaces_around_ranges`
1259 Put spaces around the .. and ... range operators
1261 - **Default value**: `false`
1262 - **Possible values**: `true`, `false`
1273 let lorem = 0 .. 10;
1276 ## `spaces_within_angle_brackets`
1278 Put spaces within non-empty generic arguments
1280 - **Default value**: `false`
1281 - **Possible values**: `true`, `false`
1286 fn lorem<T: Eq>(t: T) {
1294 fn lorem< T: Eq >(t: T) {
1299 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1301 ## `spaces_within_parens`
1303 Put spaces within non-empty parentheses
1305 - **Default value**: `false`
1306 - **Possible values**: `true`, `false`
1311 fn lorem<T: Eq>(t: T) {
1312 let lorem = (ipsum, dolor);
1319 fn lorem<T: Eq>( t: T ) {
1320 let lorem = ( ipsum, dolor );
1324 See also: [`spaces_within_angle_brackets`](#spaces_within_angle_brackets), [`spaces_within_square_brackets`](#spaces_within_square_brackets).
1326 ## `spaces_within_square_brackets`
1328 Put spaces within non-empty square brackets
1330 - **Default value**: `false`
1331 - **Possible values**: `true`, `false`
1336 let lorem: [usize; 2] = [ipsum, dolor];
1342 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1345 See also: [`spaces_within_parens`](#spaces_within_parens), [`spaces_within_angle_brackets`](#spaces_within_angle_brackets).
1347 ## `struct_lit_multiline_style`
1349 Multiline style on literal structs
1351 - **Default value**: `"PreferSingle"`
1352 - **Possible values**: `"ForceMulti"`, `"PreferSingle"`
1354 #### `"ForceMulti"`:
1363 #### `"PreferSingle"`:
1366 let lorem = Lorem { ipsum: dolor, sit: amet };
1369 See also: [`struct_lit_style`](#struct_lit_style), [`struct_lit_width`](#struct_lit_width).
1371 ## `struct_lit_style`
1373 Style of struct definition
1375 - **Default value**: `"Block"`
1376 - **Possible values**: `"Block"`, `"Visual"`
1390 let lorem = Lorem { ipsum: dolor,
1394 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1396 ## `struct_lit_width`
1398 Maximum width in the body of a struct lit before falling back to vertical formatting
1400 - **Default value**: `18`
1401 - **Possible values**: any positive integer
1403 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1405 #### Lines shorter than `struct_lit_width`:
1407 let lorem = Lorem { ipsum: dolor, sit: amet };
1410 #### Lines longer than `struct_lit_width`:
1411 See [`struct_lit_style`](#struct_lit_style).
1413 See also: [`struct_lit_multiline_style`](#struct_lit_multiline_style), [`struct_lit_style`](#struct_lit_style).
1415 ## `struct_variant_width`
1417 Maximum width in the body of a struct variant before falling back to vertical formatting
1419 - **Default value**: `35`
1420 - **Possible values**: any positive integer
1422 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1424 #### Struct variants shorter than `struct_variant_width`:
1429 Sit { amet: Consectetur, adipiscing: Elit },
1433 #### Struct variants longer than `struct_variant_width`:
1447 Number of spaces per tab
1449 - **Default value**: `4`
1450 - **Possible values**: any positive integer
1456 let ipsum = dolor();
1458 "amet consectetur adipiscing elit."
1467 let ipsum = dolor();
1469 "amet consectetur adipiscing elit."
1474 See also: [`hard_tabs`](#hard_tabs).
1476 ## `take_source_hints`
1478 Retain some formatting characteristics from the source code
1480 - **Default value**: `false`
1481 - **Possible values**: `true`, `false`
1488 .dolor(|| { sit.amet().consectetur().adipiscing().elit(); });
1504 Note: This only applies if the call chain within the inner closure had already been formatted on separate lines before running rustfmt.
1508 How to handle trailing commas for lists
1510 - **Default value**: `"Vertical"`
1511 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1516 let Lorem { ipsum, dolor, sit, } = amet;
1530 let Lorem { ipsum, dolor, sit } = amet;
1544 let Lorem { ipsum, dolor, sit } = amet;
1555 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1557 ## `type_punctuation_density`
1559 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1561 - **Default value**: `"Wide"`
1562 - **Possible values**: `"Compressed"`, `"Wide"`
1564 #### `"Compressed"`:
1567 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1575 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1580 ## `use_try_shorthand`
1582 Replace uses of the try! macro by the ? shorthand
1584 - **Default value**: `false`
1585 - **Possible values**: `true`, `false`
1590 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1596 let lorem = ipsum.map(|dolor| dolor.sit())?;
1601 Density of a where clause
1603 - **Default value**: `"CompressedIfEmpty"`
1604 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1606 #### `"Compressed"`:
1610 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1612 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
1618 #### `"CompressedIfEmpty"`:
1622 fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
1624 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1636 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1639 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1647 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
1653 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1656 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1664 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1666 See also: [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1670 Element layout inside a where clause
1672 - **Default value**: `"Vertical"`
1673 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
1675 #### `"Horizontal"`:
1678 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1679 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1684 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1685 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1691 #### `"HorizontalVertical"`:
1694 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1695 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1700 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1701 where Ipsum: IpsumDolorSitAmet,
1702 Dolor: DolorSitAmetConsectetur,
1703 Sit: SitAmetConsecteturAdipiscing,
1704 Amet: AmetConsecteturAdipiscingElit
1713 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1714 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
1719 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1720 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
1721 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
1730 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
1731 where Ipsum: IpsumDolorSitAmet,
1732 Dolor: DolorSitAmetConsectetur
1737 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
1738 where Ipsum: IpsumDolorSitAmet,
1739 Dolor: DolorSitAmetConsectetur,
1740 Sit: SitAmetConsecteturAdipiscing,
1741 Amet: AmetConsecteturAdipiscingElit
1747 See also: [`where_density`](#where_density), [`where_pred_indent`](#where_pred_indent), [`where_style`](#where_style).
1749 ## `where_pred_indent`
1751 Indentation style of a where predicate
1753 - **Default value**: `"Visual"`
1754 - **Possible values**: `"Block"`, `"Visual"`
1759 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1772 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1782 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_style`](#where_style).
1786 Overall strategy for where clauses
1788 - **Default value**: `"Default"`
1789 - **Possible values**: `"Default"`, `"Rfc"`
1794 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1807 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
1818 See also: [`where_density`](#where_density), [`where_layout`](#where_layout), [`where_pred_indent`](#where_pred_indent).
1822 Break comments to fit on the line
1824 - **Default value**: `false`
1825 - **Possible values**: `true`, `false`
1830 // 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.
1836 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
1837 // sed do eiusmod tempor incididunt ut labore et dolore
1838 // magna aliqua. Ut enim ad minim veniam, quis nostrud
1839 // exercitation ullamco laboris nisi ut aliquip ex ea
1840 // commodo consequat.
1843 ## `wrap_match_arms`
1845 Wrap multiline match arms in blocks
1847 - **Default value**: `true`
1848 - **Possible values**: `true`, `false`
1856 println!("{}", ipsum);
1870 println!("{}", ipsum);
1872 false => println!("{}", sit),
1876 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
1880 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
1882 - **Default value**: `"Replace"`
1883 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`