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 [`indent_style`](#indent_style) 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.
55 Indent on expressions or items.
57 - **Default value**: `"Block"`
58 - **Possible values**: `"Block"`, `"Visual"`
62 #### `"Block"` (default):
79 let lorem = vec!["ipsum",
90 #### `"Block"` (default):
111 See also: [`control_brace_style`](#control_brace_style).
113 ### Function arguments
115 #### `"Block"` (default):
120 fn lorem(ipsum: usize) {}
140 fn lorem(ipsum: usize) {}
142 fn lorem(ipsum: usize,
155 #### `"Block"` (default):
185 #### `"Block"` (default):
193 Adipiscing: Eq = usize,
194 Consectetur: Eq = usize,
201 adipiscing: Adipiscing,
202 consectetur: Consectetur,
212 fn lorem<Ipsum: Eq = usize,
216 Adipiscing: Eq = usize,
217 Consectetur: Eq = usize,
223 adipiscing: Adipiscing,
224 consectetur: Consectetur,
233 #### `"Block"` (default):
245 let lorem = Lorem { ipsum: dolor,
249 See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
253 #### `"Block"` (default):
256 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
270 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
280 See also: [`where_density`](#where_density), [`where_layout`](#where_layout).
284 Maximum width of an array literal before falling back to vertical formatting
286 - **Default value**: `60`
287 - **Possible values**: any positive integer
289 **Note:** A value of `0` results in [`indent_style`](#indent_style) being applied regardless of a line's width.
291 #### Lines shorter than `array_width`:
293 let lorem = vec!["ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit"];
296 #### Lines longer than `array_width`:
297 See [`indent_style`](#indent_style).
299 ## `same_line_attributes`
301 Try to put attributes on the same line as fields and variants
303 - **Default value**: `true`
304 - **Possible values**: `true`, `false`
306 #### `true` (default):
310 #[serde(rename = "Ipsum")] ipsum: usize,
311 #[serde(rename = "Dolor")] dolor: usize,
312 #[serde(rename = "Amet")] amet: usize,
316 #[serde(skip_serializing)] Ipsum,
317 #[serde(skip_serializing)] Dolor,
318 #[serde(skip_serializing)] Amet,
326 #[serde(rename = "Ipsum")]
328 #[serde(rename = "Dolor")]
330 #[serde(rename = "Amet")]
335 #[serde(skip_serializing)]
337 #[serde(skip_serializing)]
339 #[serde(skip_serializing)]
347 Where to put a binary operator when a binary expression goes multiline.
349 - **Default value**: `"Front"`
350 - **Possible values**: `"Front"`, `"Back"`
352 #### `"Front"` (default):
363 let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
364 ..bbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
378 let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
379 bbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
386 - **Default value**: `"Block"`
387 - **Possible values**: `"Block"`, `"Visual"`
389 #### `"Block"` (default):
404 let lorem = ipsum.dolor()
412 See also [`chain_width`](#chain_width).
416 Maximum length of a chain to fit on a single line
418 - **Default value**: `60`
419 - **Possible values**: any positive integer
421 #### Lines shorter than `chain_width`:
423 let lorem = ipsum.dolor().sit().amet().consectetur().adipiscing().elit();
426 #### Lines longer than `chain_width`:
427 See [`chain_indent`](#chain_indent).
430 ## `combine_control_expr`
432 Combine control expressions with function calls.
434 - **Default value**: `true`
435 - **Possible values**: `true`, `false`
437 #### `true` (default):
449 foo!(if let Some(..) = x {
462 foo!(while let Some(..) = x {
496 if let Some(..) = x {
513 while let Some(..) = x {
539 Maximum length of comments. No effect unless`wrap_comments = true`.
541 - **Default value**: `80`
542 - **Possible values**: any positive integer
544 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
546 #### Comments shorter than `comment_width`:
548 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
551 #### Comments longer than `comment_width`:
553 // Lorem ipsum dolor sit amet,
554 // consectetur adipiscing elit.
557 See also [`wrap_comments`](#wrap_comments).
559 ## `condense_wildcard_suffixes`
561 Replace strings of _ wildcards by a single .. in tuple patterns
563 - **Default value**: `false`
564 - **Possible values**: `true`, `false`
566 #### `false` (default):
569 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
575 let (lorem, ipsum, ..) = (1, 2, 3, 4);
578 ## `control_brace_style`
580 Brace style for control flow constructs
582 - **Default value**: `"AlwaysSameLine"`
583 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
585 #### `"AlwaysSameLine"` (default):
595 #### `"AlwaysNextLine"`:
608 #### `"ClosingNextLine"`:
619 ## `disable_all_formatting`
621 Don't reformat anything
623 - **Default value**: `false`
624 - **Possible values**: `true`, `false`
626 ## `error_on_line_overflow`
628 Error if unable to get all lines within `max_width`
630 - **Default value**: `true`
631 - **Possible values**: `true`, `false`
633 See also [`max_width`](#max_width).
635 ## `error_on_line_overflow_comments`
637 Error if unable to get all comment lines within `comment_width`.
639 - **Default value**: `true`
640 - **Possible values**: `true`, `false`
642 See also [`comment_width`](#comment_width).
646 Argument density in functions
648 - **Default value**: `"Tall"`
649 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
651 #### `"Tall"` (default):
655 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
657 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
666 consectetur: Consectetur,
667 adipiscing: Adipiscing,
676 consectetur: Consectetur,
677 adipiscing: Adipiscing,
689 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
691 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
696 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
697 adipiscing: Adipiscing, elit: Elit,
701 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
702 adipiscing: Adipiscing, elit: Elit,
709 #### `"CompressedIfEmpty"`:
713 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
715 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
720 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
721 adipiscing: Adipiscing, elit: Elit,
729 consectetur: Consectetur,
730 adipiscing: Adipiscing,
742 fn lorem(ipsum: Ipsum,
747 fn lorem(ipsum: Ipsum,
754 fn lorem(ipsum: Ipsum,
758 consectetur: Consectetur,
759 adipiscing: Adipiscing,
762 fn lorem(ipsum: Ipsum,
766 consectetur: Consectetur,
767 adipiscing: Adipiscing,
777 Brace style for items
779 - **Default value**: `"SameLineWhere"`
780 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
784 #### `"SameLineWhere"` (default):
791 fn lorem(ipsum: usize) {
795 fn lorem<T>(ipsum: T)
797 T: Add + Sub + Mul + Div,
803 #### `"AlwaysNextLine"`:
811 fn lorem(ipsum: usize)
816 fn lorem<T>(ipsum: T)
818 T: Add + Sub + Mul + Div,
824 #### `"PreferSameLine"`:
831 fn lorem(ipsum: usize) {
835 fn lorem<T>(ipsum: T)
837 T: Add + Sub + Mul + Div, {
842 ### Structs and enums
844 #### `"SameLineWhere"` (default):
858 #### `"AlwaysNextLine"`:
873 #### `"PreferSameLine"`:
888 Maximum width of the args of a function call before falling back to vertical formatting
890 - **Default value**: `60`
891 - **Possible values**: any positive integer
893 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
895 #### Function call shorter than `fn_call_width`:
897 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
900 #### Function call longer than `fn_call_width`:
902 See [`indent_style`](#indent_style).
904 ## `fn_empty_single_line`
906 Put empty-body functions on a single line
908 - **Default value**: `true`
909 - **Possible values**: `true`, `false`
911 #### `true` (default):
924 See also [`control_brace_style`](#control_brace_style).
929 Put single-expression functions on a single line
931 - **Default value**: `false`
932 - **Possible values**: `true`, `false`
934 #### `false` (default):
937 fn lorem() -> usize {
941 fn lorem() -> usize {
950 fn lorem() -> usize { 42 }
952 fn lorem() -> usize {
958 See also [`control_brace_style`](#control_brace_style).
960 ## `force_explicit_abi`
962 Always print the abi for extern items
964 - **Default value**: `true`
965 - **Possible values**: `true`, `false`
967 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
969 #### `true` (default):
973 pub static lorem: c_int;
981 pub static lorem: c_int;
987 Format string literals where necessary
989 - **Default value**: `false`
990 - **Possible values**: `true`, `false`
992 #### `false` (default):
995 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit";
1002 "ipsum dolor sit amet consectetur \
1003 adipiscing elit lorem ipsum dolor sit";
1006 See also [`max_width`](#max_width).
1010 Use tab characters for indentation, spaces for alignment
1012 - **Default value**: `false`
1013 - **Possible values**: `true`, `false`
1015 #### `false` (default):
1018 fn lorem() -> usize {
1019 42 // spaces before 42
1026 fn lorem() -> usize {
1027 42 // tabs before 42
1031 See also: [`tab_spaces`](#tab_spaces).
1033 ## `impl_empty_single_line`
1035 Put empty-body implementations on a single line
1037 - **Default value**: `true`
1038 - **Possible values**: `true`, `false`
1040 #### `true` (default):
1053 See also [`brace_style`](#brace_style).
1055 ## `indent_match_arms`
1057 Indent match arms instead of keeping them at the same indentation level as the match keyword
1059 - **Default value**: `true`
1060 - **Possible values**: `true`, `false`
1062 #### `true` (default):
1084 See also: [`match_block_trailing_comma`](#match_block_trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1088 Indent style of imports
1090 - **Default Value**: `"Visual"`
1091 - **Possible values**: `"Block"`, `"Visual"`
1093 #### `"Visual"` (default):
1111 See also: [`imports_layout`](#imports_layout).
1115 Item layout inside a imports block
1117 - **Default value**: "Mixed"
1118 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
1120 #### `"Mixed"` (default):
1123 use foo::{xxx, yyy, zzz};
1125 use foo::{aaa, bbb, ccc,
1129 #### `"Horizontal"`:
1131 **Note**: This option forces to put everything on one line and may exceeds `max_width`.
1134 use foo::{xxx, yyy, zzz};
1136 use foo::{aaa, bbb, ccc, ddd, eee, fff};
1139 #### `"HorizontalVertical"`:
1142 use foo::{xxx, yyy, zzz};
1167 ## `match_arm_forces_newline`
1169 Consistently put match arms (block based or not) in a newline.
1171 - **Default value**: `false`
1172 - **Possible values**: `true`, `false`
1174 #### `false` (default):
1178 // a non-empty block
1185 X2 => println!("ok"),
1193 // a non-empty block
1207 See also: [`wrap_match_arms`](#wrap_match_arms).
1209 ## `match_block_trailing_comma`
1211 Put a trailing comma after a block based match arm (non-block arms are not affected)
1213 - **Default value**: `false`
1214 - **Possible values**: `true`, `false`
1216 #### `false` (default):
1223 Lorem::Dolor => println!("dolor"),
1234 Lorem::Dolor => println!("dolor"),
1238 See also: [`indent_match_arms`](#indent_match_arms), [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
1242 Maximum width of each line
1244 - **Default value**: `100`
1245 - **Possible values**: any positive integer
1247 See also [`error_on_line_overflow`](#error_on_line_overflow).
1251 Merge multiple derives into a single one.
1253 - **Default value**: `true`
1254 - **Possible values**: `true`, `false`
1256 #### `true` (default):
1259 #[derive(Eq, PartialEq, Debug, Copy, Clone)]
1266 #[derive(Eq, PartialEq)]
1268 #[derive(Copy, Clone)]
1272 ## `multiline_closure_forces_block`
1274 Force multiline closure bodies to be wrapped in a block
1276 - **Default value**: `false`
1277 - **Possible values**: `false`, `true`
1279 #### `false` (default):
1282 result.and_then(|maybe_value| match maybe_value {
1292 result.and_then(|maybe_value| {
1300 ## `multiline_match_arm_forces_block`
1302 Force multiline match arm bodies to be wrapped in a block
1304 - **Default value**: `false`
1305 - **Possible values**: `false`, `true`
1307 #### `false` (default):
1312 println!("Hello World");
1324 println!("Hello World");
1333 Unix or Windows line endings
1335 - **Default value**: `"Unix"`
1336 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1338 ## `normalize_comments`
1340 Convert /* */ comments to // comments where possible
1342 - **Default value**: `false`
1343 - **Possible values**: `true`, `false`
1345 #### `false` (default):
1349 fn dolor() -> usize {}
1352 fn adipiscing() -> usize {}
1359 fn dolor() -> usize {}
1362 fn adipiscing() -> usize {}
1365 ## `reorder_imported_names`
1367 Reorder lists of names in import statements alphabetically
1369 - **Default value**: `false`
1370 - **Possible values**: `true`, `false`
1372 #### `false` (default):
1375 use super::{lorem, ipsum, dolor, sit};
1381 use super::{dolor, ipsum, lorem, sit};
1384 See also [`reorder_imports`](#reorder_imports).
1386 ## `reorder_imports`
1388 Reorder import statements alphabetically
1390 - **Default value**: `false`
1391 - **Possible values**: `true`, `false`
1393 #### `false` (default):
1411 See also [`reorder_imported_names`](#reorder_imported_names), [`reorder_imports_in_group`](#reorder_imports_in_group).
1413 ## `reorder_imports_in_group`
1415 Reorder import statements in group
1417 - **Default value**: `false`
1418 - **Possible values**: `true`, `false`
1420 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1422 #### `false` (default):
1446 See also [`reorder_imports`](#reorder_imports).
1448 ## `reorder_extern_crates`
1450 Reorder `extern crate` statements alphabetically
1452 - **Default value**: `true`
1453 - **Possible values**: `true`, `false`
1455 #### `true` (default):
1473 See also [`reorder_extern_crates_in_group`](#reorder_extern_crates_in_group).
1475 ## `reorder_extern_crates_in_group`
1477 Reorder `extern crate` statements in group
1479 - **Default value**: `true`
1480 - **Possible values**: `true`, `false`
1482 **Note:** This option takes effect only when [`reorder_imports`](#reorder_imports) is set to `true`.
1484 #### `true` (default):
1508 See also [`reorder_extern_crates`](#reorder_extern_crates).
1512 Report `TODO` items in comments.
1514 - **Default value**: `"Never"`
1515 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
1517 Warns about any comments containing `TODO` in them when set to `"Always"`. If
1518 it contains a `#X` (with `X` being a number) in parentheses following the
1519 `TODO`, `"Unnumbered"` will ignore it.
1521 See also [`report_fixme`](#report_fixme).
1525 Report `FIXME` items in comments.
1527 - **Default value**: `"Never"`
1528 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
1530 Warns about any comments containing `FIXME` in them when set to `"Always"`. If
1531 it contains a `#X` (with `X` being a number) in parentheses following the
1532 `FIXME`, `"Unnumbered"` will ignore it.
1534 See also [`report_todo`](#report_todo).
1536 ## `single_line_if_else_max_width`
1538 Maximum line length for single line if-else expressions.
1540 - **Default value**: `50`
1541 - **Possible values**: any positive integer
1543 **Note:** A value of `0` results in if-else expressions being broken regardless of their line's width.
1545 #### Lines shorter than `single_line_if_else_max_width`:
1547 let lorem = if ipsum { dolor } else { sit };
1550 #### Lines longer than `single_line_if_else_max_width`:
1552 let lorem = if ipsum {
1559 See also: [`control_brace_style`](#control_brace_style).
1563 Don't reformat out of line modules
1565 - **Default value**: `false`
1566 - **Possible values**: `true`, `false`
1568 ## `space_after_colon`
1570 Leave a space after the colon.
1572 - **Default value**: `true`
1573 - **Possible values**: `true`, `false`
1575 #### `true` (default):
1578 fn lorem<T: Eq>(t: T) {
1579 let lorem: Dolor = Lorem {
1589 fn lorem<T:Eq>(t:T) {
1590 let lorem:Dolor = Lorem {
1597 See also: [`space_before_colon`](#space_before_colon).
1599 ## `space_before_colon`
1601 Leave a space before the colon.
1603 - **Default value**: `false`
1604 - **Possible values**: `true`, `false`
1606 #### `false` (default):
1609 fn lorem<T: Eq>(t: T) {
1610 let lorem: Dolor = Lorem {
1620 fn lorem<T : Eq>(t : T) {
1621 let lorem : Dolor = Lorem {
1628 See also: [`space_after_colon`](#space_after_colon).
1630 ## `struct_field_align_threshold`
1632 The maximum diff of width between struct fields to be aligned with each other.
1634 - **Default value** : 0
1635 - **Possible values**: any positive integer
1659 ## `spaces_around_ranges`
1661 Put spaces around the .. and ... range operators
1663 - **Default value**: `false`
1664 - **Possible values**: `true`, `false`
1666 #### `false` (default):
1675 let lorem = 0 .. 10;
1678 ## `spaces_within_parens_and_brackets`
1680 Put spaces within non-empty generic arguments
1682 - **Default value**: `false`
1683 - **Possible values**: `true`, `false`
1685 #### `false` (default):
1688 fn lorem<T: Eq>(t: T) {
1696 fn lorem< T: Eq >(t: T) {
1701 See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1703 ## `spaces_within_parens_and_brackets`
1705 Put spaces within non-empty parentheses
1707 - **Default value**: `false`
1708 - **Possible values**: `true`, `false`
1710 #### `false` (default):
1713 fn lorem<T: Eq>(t: T) {
1714 let lorem = (ipsum, dolor);
1721 fn lorem<T: Eq>( t: T ) {
1722 let lorem = ( ipsum, dolor );
1726 See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1728 ## `spaces_within_parens_and_brackets`
1730 Put spaces within non-empty square brackets
1732 - **Default value**: `false`
1733 - **Possible values**: `true`, `false`
1735 #### `false` (default):
1738 let lorem: [usize; 2] = [ipsum, dolor];
1744 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1747 See also: [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets), [`spaces_within_parens_and_brackets`](#spaces_within_parens_and_brackets).
1749 ## `struct_lit_single_line`
1751 Put small struct literals on a single line
1753 - **Default value**: `true`
1754 - **Possible values**: `true`, `false`
1756 #### `true` (default):
1759 let lorem = Lorem { ipsum: dolor, sit: amet };
1771 See also: [`indent_style`](#indent_style), [`struct_lit_width`](#struct_lit_width).
1773 ## `struct_lit_width`
1775 Maximum width in the body of a struct lit before falling back to vertical formatting
1777 - **Default value**: `18`
1778 - **Possible values**: any positive integer
1780 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1782 #### Lines shorter than `struct_lit_width`:
1784 let lorem = Lorem { ipsum: dolor, sit: amet };
1787 #### Lines longer than `struct_lit_width`:
1788 See [`indent_style`](#indent_style).
1790 See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
1792 ## `struct_variant_width`
1794 Maximum width in the body of a struct variant before falling back to vertical formatting
1796 - **Default value**: `35`
1797 - **Possible values**: any positive integer
1799 **Note:** A value of `0` results in vertical formatting being applied regardless of a line's width.
1801 #### Struct variants shorter than `struct_variant_width`:
1806 Sit { amet: Consectetur, adipiscing: Elit },
1810 #### Struct variants longer than `struct_variant_width`:
1824 Number of spaces per tab
1826 - **Default value**: `4`
1827 - **Possible values**: any positive integer
1833 let ipsum = dolor();
1835 "amet consectetur adipiscing elit."
1844 let ipsum = dolor();
1846 "amet consectetur adipiscing elit."
1851 See also: [`hard_tabs`](#hard_tabs).
1856 How to handle trailing commas for lists
1858 - **Default value**: `"Vertical"`
1859 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1861 #### `"Vertical"` (default):
1864 let Lorem { ipsum, dolor, sit } = amet;
1878 let Lorem { ipsum, dolor, sit, } = amet;
1892 let Lorem { ipsum, dolor, sit } = amet;
1903 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1905 ## `trailing_semicolon`
1907 Add trailing semicolon after break, continue and return
1909 - **Default value**: `true`
1910 - **Possible values**: `true`, `false`
1912 #### `true` (default):
1926 ## `type_punctuation_density`
1928 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1930 - **Default value**: `"Wide"`
1931 - **Possible values**: `"Compressed"`, `"Wide"`
1933 #### `"Wide"` (default):
1936 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1941 #### `"Compressed"`:
1944 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1949 ## `use_try_shorthand`
1951 Replace uses of the try! macro by the ? shorthand
1953 - **Default value**: `false`
1954 - **Possible values**: `true`, `false`
1956 #### `false` (default):
1959 let lorem = try!(ipsum.map(|dolor|dolor.sit()));
1965 let lorem = ipsum.map(|dolor| dolor.sit())?;
1970 Density of a where clause.
1972 - **Default value**: `"Vertical"`
1973 - **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
1975 #### `"Vertical"` (default):
1979 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1983 fn ipsum<Dolor>(dolor: Dolor) -> Sit
1992 **Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
1994 #### `"CompressedIfEmpty"`:
1998 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2001 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2010 #### `"Compressed"`:
2014 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2017 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2028 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2032 fn ipsum<Dolor>(dolor: Dolor) -> Sit
2041 **Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
2043 See also: [`where_layout`](#where_layout), [`indent_style`](#indent_style).
2047 Element layout inside a where clause
2049 - **Default value**: `"Vertical"`
2050 - **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
2052 #### `"Vertical"` (default):
2055 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
2056 where Ipsum: IpsumDolorSitAmet,
2057 Dolor: DolorSitAmetConsectetur
2062 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
2063 where Ipsum: IpsumDolorSitAmet,
2064 Dolor: DolorSitAmetConsectetur,
2065 Sit: SitAmetConsecteturAdipiscing,
2066 Amet: AmetConsecteturAdipiscingElit
2072 #### `"Horizontal"`:
2075 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
2076 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
2081 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
2082 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
2088 #### `"HorizontalVertical"`:
2091 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
2092 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
2097 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
2098 where Ipsum: IpsumDolorSitAmet,
2099 Dolor: DolorSitAmetConsectetur,
2100 Sit: SitAmetConsecteturAdipiscing,
2101 Amet: AmetConsecteturAdipiscingElit
2110 fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
2111 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
2116 fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
2117 where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
2118 Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
2124 See also: [`where_density`](#where_density), [`indent_style`](#indent_style).
2128 Break comments to fit on the line
2130 - **Default value**: `false`
2131 - **Possible values**: `true`, `false`
2133 #### `false` (default):
2136 // 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.
2142 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
2143 // sed do eiusmod tempor incididunt ut labore et dolore
2144 // magna aliqua. Ut enim ad minim veniam, quis nostrud
2145 // exercitation ullamco laboris nisi ut aliquip ex ea
2146 // commodo consequat.
2149 ## `wrap_match_arms`
2151 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
2153 - **Default value**: `true`
2154 - **Possible values**: `true`, `false`
2156 #### `true` (default):
2161 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
2163 false => println!("{}", sit),
2172 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
2173 false => println!("{}", sit),
2177 See also: [`indent_match_arms`](#indent_match_arms), [`match_block_trailing_comma`](#match_block_trailing_comma).
2181 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
2183 - **Default value**: `"Overwrite"`
2184 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`