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:
9 reorder_imports = false
12 Each configuration option is either stable or unstable.
13 Stable options can be used directly, while unstable options are opt-in.
14 To enable unstable options, set `unstable_features = true` in `rustfmt.toml` or pass `--unstable-features` to rustfmt.
16 # Configuration Options
18 Below you find a detailed visual guide on all the supported configuration options of rustfmt:
23 Indent on expressions or items.
25 - **Default value**: `"Block"`
26 - **Possible values**: `"Block"`, `"Visual"`
31 #### `"Block"` (default):
51 let lorem = vec!["ipsum",
63 #### `"Block"` (default):
97 See also: [`control_brace_style`](#control_brace_style).
99 ### Function arguments
101 #### `"Block"` (default):
106 fn lorem(ipsum: usize) {}
126 fn lorem(ipsum: usize) {}
128 fn lorem(ipsum: usize,
141 #### `"Block"` (default):
175 #### `"Block"` (default):
183 Adipiscing: Eq = usize,
184 Consectetur: Eq = usize,
191 adipiscing: Adipiscing,
192 consectetur: Consectetur,
202 fn lorem<Ipsum: Eq = usize,
206 Adipiscing: Eq = usize,
207 Consectetur: Eq = usize,
213 adipiscing: Adipiscing,
214 consectetur: Consectetur,
223 #### `"Block"` (default):
238 let lorem = Lorem { ipsum: dolor,
243 See also: [`struct_lit_single_line`](#struct_lit_single_line), [`indent_style`](#indent_style).
247 #### `"Block"` (default):
250 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
264 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
274 ## `use_small_heuristics`
276 Whether to use different formatting for items and expressions if they satisfy a heuristic notion of 'small'.
278 - **Default value**: `true`
279 - **Possible values**: `true`, `false`
282 #### `true` (default):
288 Sit { amet: Consectetur, adipiscing: Elit },
306 let lorem = Lorem { ipsum: dolor };
308 let lorem = if ipsum { dolor } else { sit };
325 lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing");
332 let lorem = if ipsum {
342 Where to put a binary operator when a binary expression goes multiline.
344 - **Default value**: `"Front"`
345 - **Possible values**: `"Front"`, `"Back"`
348 #### `"Front"` (default):
352 let or = foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
353 || barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar;
355 let sum = 123456789012345678901234567890
356 + 123456789012345678901234567890
357 + 123456789012345678901234567890;
359 let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
360 ..bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
368 let or = foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo ||
369 barbarbarbarbarbarbarbarbarbarbarbarbarbarbarbar;
371 let sum = 123456789012345678901234567890 +
372 123456789012345678901234567890 +
373 123456789012345678901234567890;
375 let range = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..
376 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
380 ## `combine_control_expr`
382 Combine control expressions with function calls.
384 - **Default value**: `true`
385 - **Possible values**: `true`, `false`
388 #### `true` (default):
400 foo!(if let Some(..) = x {
413 foo!(while let Some(..) = x {
447 if let Some(..) = x {
464 while let Some(..) = x {
490 Maximum length of comments. No effect unless`wrap_comments = true`.
492 - **Default value**: `80`
493 - **Possible values**: any positive integer
496 **Note:** A value of `0` results in [`wrap_comments`](#wrap_comments) being applied regardless of a line's width.
498 #### `80` (default; comments shorter than `comment_width`):
500 // Lorem ipsum dolor sit amet, consectetur adipiscing elit.
503 #### `60` (comments longer than `comment_width`):
505 // Lorem ipsum dolor sit amet,
506 // consectetur adipiscing elit.
509 See also [`wrap_comments`](#wrap_comments).
511 ## `condense_wildcard_suffixes`
513 Replace strings of _ wildcards by a single .. in tuple patterns
515 - **Default value**: `false`
516 - **Possible values**: `true`, `false`
519 #### `false` (default):
523 let (lorem, ipsum, _, _) = (1, 2, 3, 4);
524 let (lorem, ipsum, ..) = (1, 2, 3, 4);
532 let (lorem, ipsum, ..) = (1, 2, 3, 4);
536 ## `control_brace_style`
538 Brace style for control flow constructs
540 - **Default value**: `"AlwaysSameLine"`
541 - **Possible values**: `"AlwaysNextLine"`, `"AlwaysSameLine"`, `"ClosingNextLine"`
544 #### `"AlwaysSameLine"` (default):
556 #### `"AlwaysNextLine"`:
571 #### `"ClosingNextLine"`:
584 ## `disable_all_formatting`
586 Don't reformat anything
588 - **Default value**: `false`
589 - **Possible values**: `true`, `false`
592 ## `error_on_line_overflow`
594 Error if Rustfmt is unable to get all lines within `max_width`, except for comments and string
595 literals. If this happens, then it is a bug in Rustfmt. You might be able to work around the bug by
596 refactoring your code to avoid long/complex expressions, usually by extracting a local variable or
597 using a shorter name.
599 - **Default value**: `false`
600 - **Possible values**: `true`, `false`
603 See also [`max_width`](#max_width).
605 ## `error_on_unformatted`
607 Error if unable to get comments or string literals within `max_width`, or they are left with
608 trailing whitespaces.
610 - **Default value**: `false`
611 - **Possible values**: `true`, `false`
616 Argument density in functions
618 - **Default value**: `"Tall"`
619 - **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
622 #### `"Tall"` (default):
626 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
628 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
637 consectetur: Consectetur,
638 adipiscing: Adipiscing,
647 consectetur: Consectetur,
648 adipiscing: Adipiscing,
660 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
662 fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
667 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
668 adipiscing: Adipiscing, elit: Elit,
672 ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
673 adipiscing: Adipiscing, elit: Elit,
705 consectetur: Consectetur,
706 adipiscing: Adipiscing,
715 consectetur: Consectetur,
716 adipiscing: Adipiscing,
727 Brace style for items
729 - **Default value**: `"SameLineWhere"`
730 - **Possible values**: `"AlwaysNextLine"`, `"PreferSameLine"`, `"SameLineWhere"`
735 #### `"SameLineWhere"` (default):
742 fn lorem(ipsum: usize) {
746 fn lorem<T>(ipsum: T)
748 T: Add + Sub + Mul + Div,
754 #### `"AlwaysNextLine"`:
762 fn lorem(ipsum: usize)
767 fn lorem<T>(ipsum: T)
769 T: Add + Sub + Mul + Div,
775 #### `"PreferSameLine"`:
782 fn lorem(ipsum: usize) {
786 fn lorem<T>(ipsum: T)
788 T: Add + Sub + Mul + Div, {
793 ### Structs and enums
795 #### `"SameLineWhere"` (default):
810 #### `"AlwaysNextLine"`:
826 #### `"PreferSameLine"`:
841 ## `empty_item_single_line`
843 Put empty-body functions and impls on a single line
845 - **Default value**: `true`
846 - **Possible values**: `true`, `false`
849 #### `true` (default):
867 See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
872 Put single-expression functions on a single line
874 - **Default value**: `false`
875 - **Possible values**: `true`, `false`
878 #### `false` (default):
881 fn lorem() -> usize {
885 fn lorem() -> usize {
894 fn lorem() -> usize { 42 }
896 fn lorem() -> usize {
902 See also [`control_brace_style`](#control_brace_style).
905 ## `where_single_line`
907 Forces the `where` clause to be laid out on a single line.
909 - **Default value**: `false`
910 - **Possible values**: `true`, `false`
913 #### `false` (default):
928 where Option<T>: Ipsum
934 See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
937 ## `force_explicit_abi`
939 Always print the abi for extern items
941 - **Default value**: `true`
942 - **Possible values**: `true`, `false`
945 **Note:** Non-"C" ABIs are always printed. If `false` then "C" is removed.
947 #### `true` (default):
951 pub static lorem: c_int;
959 pub static lorem: c_int;
965 Format string literals where necessary
967 - **Default value**: `false`
968 - **Possible values**: `true`, `false`
971 #### `false` (default):
976 "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet consectetur adipiscing";
984 let lorem = "ipsum dolor sit amet consectetur adipiscing elit lorem ipsum dolor sit amet \
985 consectetur adipiscing";
989 See also [`max_width`](#max_width).
993 Use tab characters for indentation, spaces for alignment
995 - **Default value**: `false`
996 - **Possible values**: `true`, `false`
999 #### `false` (default):
1002 fn lorem() -> usize {
1003 42 // spaces before 42
1010 fn lorem() -> usize {
1011 42 // tabs before 42
1015 See also: [`tab_spaces`](#tab_spaces).
1020 Indent style of imports
1022 - **Default Value**: `"Visual"`
1023 - **Possible values**: `"Block"`, `"Visual"`
1026 #### `"Visual"` (default):
1029 use foo::{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
1030 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz};
1037 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,
1038 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz,
1042 See also: [`imports_layout`](#imports_layout).
1046 Item layout inside a imports block
1048 - **Default value**: "Mixed"
1049 - **Possible values**: "Horizontal", "HorizontalVertical", "Mixed", "Vertical"
1052 #### `"Mixed"` (default):
1055 use foo::{xxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzz};
1058 aaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbb, cccccccccccccccccc, dddddddddddddddddd,
1059 eeeeeeeeeeeeeeeeee, ffffffffffffffffff,
1063 #### `"Horizontal"`:
1065 **Note**: This option forces all imports onto one line and may exceed `max_width`.
1068 use foo::{xxx, yyy, zzz};
1070 use foo::{aaa, bbb, ccc, ddd, eee, fff};
1073 #### `"HorizontalVertical"`:
1076 use foo::{xxxxxxxxxxxxxxxxxx, yyyyyyyyyyyyyyyyyy, zzzzzzzzzzzzzzzzzz};
1109 Merge multiple imports into a single nested import.
1111 - **Default value**: `false`
1112 - **Possible values**: `true`, `false`
1115 #### `false` (default):
1126 use foo::{a, b, c, d, e, f, g};
1130 ## `match_block_trailing_comma`
1132 Put a trailing comma after a block based match arm (non-block arms are not affected)
1134 - **Default value**: `false`
1135 - **Possible values**: `true`, `false`
1138 #### `false` (default):
1146 Lorem::Dolor => println!("dolor"),
1159 Lorem::Dolor => println!("dolor"),
1164 See also: [`trailing_comma`](#trailing_comma), [`match_arm_blocks`](#match_arm_blocks).
1168 Maximum width of each line
1170 - **Default value**: `100`
1171 - **Possible values**: any positive integer
1174 See also [`error_on_line_overflow`](#error_on_line_overflow).
1178 Merge multiple derives into a single one.
1180 - **Default value**: `true`
1181 - **Possible values**: `true`, `false`
1184 #### `true` (default):
1187 #[derive(Eq, PartialEq, Debug, Copy, Clone)]
1194 #[derive(Eq, PartialEq)]
1196 #[derive(Copy, Clone)]
1200 ## `force_multiline_blocks`
1202 Force multiline closure and match arm bodies to be wrapped in a block
1204 - **Default value**: `false`
1205 - **Possible values**: `false`, `true`
1208 #### `false` (default):
1212 result.and_then(|maybe_value| match maybe_value {
1214 Some(value) => bar(),
1219 println!("Hello World");
1221 Some(dolor) => foo(),
1230 result.and_then(|maybe_value| {
1233 Some(value) => bar(),
1240 println!("Hello World");
1243 Some(dolor) => foo(),
1251 Unix or Windows line endings
1253 - **Default value**: `"Unix"`
1254 - **Possible values**: `"Native"`, `"Unix"`, `"Windows"`
1257 ## `normalize_comments`
1259 Convert /* */ comments to // comments where possible
1261 - **Default value**: `false`
1262 - **Possible values**: `true`, `false`
1265 #### `false` (default):
1269 fn dolor() -> usize {}
1272 fn adipiscing() -> usize {}
1279 fn dolor() -> usize {}
1282 fn adipiscing() -> usize {}
1285 ## `remove_nested_parens`
1287 Remove nested parens.
1289 - **Defalut value**: `false`,
1290 - **Possible values**: `true`, `false`
1293 #### `false` (default):
1308 ## `reorder_imports`
1310 Reorder import and extern crate statements alphabetically in groups (a group is
1311 separated by a newline).
1313 - **Default value**: `true`
1314 - **Possible values**: `true`, `false`
1317 #### `true` (default):
1336 ## `reorder_modules`
1338 Reorder `mod` declarations alphabetically in group.
1340 - **Default value**: `true`
1341 - **Possible values**: `true`, `false`
1344 #### `true` (default)
1368 **Note** `mod` with `#[macro_export]` will not be reordered since that could change the semantic
1369 of the original source code.
1371 ## `reorder_impl_items`
1373 Reorder impl items. `type` and `const` are put first, then macros and methods.
1375 - **Default value**: `false`
1376 - **Possible values**: `true`, `false`
1379 #### `false` (default)
1384 impl Iterator for Dummy {
1385 fn next(&mut self) -> Option<Self::Item> {
1398 impl Iterator for Dummy {
1401 fn next(&mut self) -> Option<Self::Item> {
1409 Report `TODO` items in comments.
1411 - **Default value**: `"Never"`
1412 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
1415 Warns about any comments containing `TODO` in them when set to `"Always"`. If
1416 it contains a `#X` (with `X` being a number) in parentheses following the
1417 `TODO`, `"Unnumbered"` will ignore it.
1419 See also [`report_fixme`](#report_fixme).
1423 Report `FIXME` items in comments.
1425 - **Default value**: `"Never"`
1426 - **Possible values**: `"Always"`, `"Unnumbered"`, `"Never"`
1429 Warns about any comments containing `FIXME` in them when set to `"Always"`. If
1430 it contains a `#X` (with `X` being a number) in parentheses following the
1431 `FIXME`, `"Unnumbered"` will ignore it.
1433 See also [`report_todo`](#report_todo).
1438 Don't reformat out of line modules
1440 - **Default value**: `false`
1441 - **Possible values**: `true`, `false`
1444 ## `space_after_colon`
1446 Leave a space after the colon.
1448 - **Default value**: `true`
1449 - **Possible values**: `true`, `false`
1452 #### `true` (default):
1455 fn lorem<T: Eq>(t: T) {
1456 let lorem: Dolor = Lorem {
1466 fn lorem<T:Eq>(t:T) {
1467 let lorem:Dolor = Lorem {
1474 See also: [`space_before_colon`](#space_before_colon).
1476 ## `space_before_colon`
1478 Leave a space before the colon.
1480 - **Default value**: `false`
1481 - **Possible values**: `true`, `false`
1484 #### `false` (default):
1487 fn lorem<T: Eq>(t: T) {
1488 let lorem: Dolor = Lorem {
1498 fn lorem<T : Eq>(t : T) {
1499 let lorem : Dolor = Lorem {
1506 See also: [`space_after_colon`](#space_after_colon).
1508 ## `struct_field_align_threshold`
1510 The maximum diff of width between struct fields to be aligned with each other.
1512 - **Default value** : 0
1513 - **Possible values**: any positive integer
1536 ## `spaces_around_ranges`
1538 Put spaces around the .., ..=, and ... range operators
1540 - **Default value**: `false`
1541 - **Possible values**: `true`, `false`
1544 #### `false` (default):
1572 let lorem = 0 .. 10;
1573 let ipsum = 0 ..= 10;
1592 ## `spaces_within_parens_and_brackets`
1594 Put spaces within non-empty generic arguments, parentheses, and square brackets
1596 - **Default value**: `false`
1597 - **Possible values**: `true`, `false`
1600 #### `false` (default):
1603 // generic arguments
1604 fn lorem<T: Eq>(t: T) {
1608 // non-empty parentheses
1609 fn lorem<T: Eq>(t: T) {
1610 let lorem = (ipsum, dolor);
1613 // non-empty square brackets
1614 fn lorem<T: Eq>(t: T) {
1615 let lorem: [usize; 2] = [ipsum, dolor];
1622 // generic arguments
1623 fn lorem< T: Eq >( t: T ) {
1627 // non-empty parentheses
1628 fn lorem< T: Eq >( t: T ) {
1629 let lorem = ( ipsum, dolor );
1632 // non-empty square brackets
1633 fn lorem< T: Eq >( t: T ) {
1634 let lorem: [ usize; 2 ] = [ ipsum, dolor ];
1638 ## `struct_lit_single_line`
1640 Put small struct literals on a single line
1642 - **Default value**: `true`
1643 - **Possible values**: `true`, `false`
1646 #### `true` (default):
1650 let lorem = Lorem { foo: bar, baz: ofo };
1665 See also: [`indent_style`](#indent_style).
1670 Number of spaces per tab
1672 - **Default value**: `4`
1673 - **Possible values**: any positive integer
1680 let ipsum = dolor();
1682 "amet consectetur adipiscing elit amet",
1683 "consectetur adipiscing elit amet consectetur.",
1692 let ipsum = dolor();
1694 "amet consectetur adipiscing elit amet",
1695 "consectetur adipiscing elit amet consectetur.",
1700 See also: [`hard_tabs`](#hard_tabs).
1705 How to handle trailing commas for lists
1707 - **Default value**: `"Vertical"`
1708 - **Possible values**: `"Always"`, `"Never"`, `"Vertical"`
1711 #### `"Vertical"` (default):
1715 let Lorem { ipsum, dolor, sit } = amet;
1731 let Lorem { ipsum, dolor, sit, } = amet;
1747 let Lorem { ipsum, dolor, sit } = amet;
1759 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1761 ## `trailing_semicolon`
1763 Add trailing semicolon after break, continue and return
1765 - **Default value**: `true`
1766 - **Possible values**: `true`, `false`
1769 #### `true` (default):
1783 ## `type_punctuation_density`
1785 Determines if `+` or `=` are wrapped in spaces in the punctuation of types
1787 - **Default value**: `"Wide"`
1788 - **Possible values**: `"Compressed"`, `"Wide"`
1791 #### `"Wide"` (default):
1794 fn lorem<Ipsum: Dolor + Sit = Amet>() {
1799 #### `"Compressed"`:
1802 fn lorem<Ipsum: Dolor+Sit=Amet>() {
1807 ## `use_field_init_shorthand`
1809 Use field initialize shorthand if possible.
1811 - **Default value**: `false`
1812 - **Possible values**: `true`, `false`
1815 #### `false` (default):
1828 let a = Foo { x: x, y: y, z: z };
1845 let a = Foo { x, y, z };
1849 ## `use_try_shorthand`
1851 Replace uses of the try! macro by the ? shorthand
1853 - **Default value**: `false`
1854 - **Possible values**: `true`, `false`
1857 #### `false` (default):
1861 let lorem = try!(ipsum.map(|dolor| dolor.sit()));
1869 let lorem = ipsum.map(|dolor| dolor.sit())?;
1876 Break comments to fit on the line
1878 - **Default value**: `false`
1879 - **Possible values**: `true`, `false`
1882 #### `false` (default):
1885 // 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.
1891 // Lorem ipsum dolor sit amet, consectetur adipiscing elit,
1892 // sed do eiusmod tempor incididunt ut labore et dolore
1893 // magna aliqua. Ut enim ad minim veniam, quis nostrud
1894 // exercitation ullamco laboris nisi ut aliquip ex ea
1895 // commodo consequat.
1898 ## `match_arm_blocks`
1900 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
1902 - **Default value**: `true`
1903 - **Possible values**: `true`, `false`
1906 #### `true` (default):
1912 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
1914 false => println!("{}", sit),
1925 foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
1926 false => println!("{}", sit),
1931 See also: [`match_block_trailing_comma`](#match_block_trailing_comma).
1935 What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage
1937 - **Default value**: `"Overwrite"`
1938 - **Possible values**: `"Checkstyle"`, `"Coverage"`, `"Diff"`, `"Display"`, `"Overwrite"`, `"Plain"`, `"Replace"`
1941 ## `blank_lines_upper_bound`
1943 Maximum number of blank lines which can be put between items. If more than this number of consecutive empty
1944 lines are found, they are trimmed down to match this integer.
1946 - **Default value**: `1`
1947 - **Possible values**: *unsigned integer*
1998 See also: [`blank_lines_lower_bound`](#blank_lines_lower_bound)
2000 ## `blank_lines_lower_bound`
2002 Minimum number of blank lines which must be put between items. If two items have fewer blank lines between
2003 them, additional blank lines are inserted.
2005 - **Default value**: `0`
2006 - **Possible values**: *unsigned integer*
2010 Original Code (rustfmt will not change it with the default value of `0`):
2039 ## `remove_blank_lines_at_start_or_end_of_block`
2041 Remove blank lines at the start or the end of a block.
2043 - **Default value**: `true`
2044 - **Possible values**: `true`, `false`
2052 let mut str = String::new();
2053 str.push_str("hello, ");
2054 str.push_str("world!");
2057 println!("{}", msg);
2068 let mut str = String::new();
2069 str.push_str("hello, ");
2070 str.push_str("world!");
2074 println!("{}", msg);
2079 ## `required_version`
2081 Require a specific version of rustfmt. If you want to make sure that the
2082 specific version of rustfmt is used in your CI, use this option.
2084 - **Default value**: `CARGO_PKG_VERSION`
2085 - **Possible values**: any published version (e.g. `"0.3.8"`)
2088 ## `hide_parse_errors`
2090 Do not show parse errors if the parser failed to parse files.
2092 - **Default value**: `false`
2093 - **Possible values**: `true`, `false`
2098 Whether to use colored output or not.
2100 - **Default value**: `"Auto"`
2101 - **Possible values**: "Auto", "Always", "Never"
2104 ## `unstable_features`
2106 Enable unstable features on stable channel.
2108 - **Default value**: `false`
2109 - **Possible values**: `true`, `false`
2112 ## `license_template_path`
2114 Check whether beginnings of files match a license template.
2116 - **Default value**: `""``
2117 - **Possible values**: path to a license template file
2120 A license template is a plain text file which is matched literally against the
2121 beginning of each source file, except for `{}`-delimited blocks, which are
2122 matched as regular expressions. The following license template therefore
2123 matches strings like `// Copyright 2017 The Rust Project Developers.`, `//
2124 Copyright 2018 The Rust Project Developers.`, etc.:
2127 // Copyright {\d+} The Rust Project Developers.
2130 `\{`, `\}` and `\\` match literal braces / backslashes.
2134 Skip formatting the specified files and directories.
2136 - **Default value**: format every files
2137 - **Possible values**: See an example below
2142 If you want to ignore specific files, put the following to your config file:
2151 If you want to ignore every file under `examples/`, put the following to your config file: