@@ -42,17 +42,20 @@ create_config! {
42
42
tab_spaces: usize , 4 , true , "Number of spaces per tab" ;
43
43
newline_style: NewlineStyle , NewlineStyle :: Native , true , "Unix or Windows line endings" ;
44
44
use_small_heuristics: Heuristics , Heuristics :: Default , true , "Whether to use different \
45
- formatting for items and expressions if they satisfy a heuristic notion of 'small'. ";
46
- indent_style: IndentStyle , IndentStyle :: Block , false , "How do we indent expressions or items. " ;
45
+ formatting for items and expressions if they satisfy a heuristic notion of 'small'";
46
+ indent_style: IndentStyle , IndentStyle :: Block , false , "How do we indent expressions or items" ;
47
47
48
- // Comments and strings
48
+ // Comments. macros, and strings
49
49
wrap_comments: bool , false , false , "Break comments to fit on the line" ;
50
50
comment_width: usize , 80 , false ,
51
51
"Maximum length of comments. No effect unless wrap_comments = true" ;
52
52
normalize_comments: bool , false , false , "Convert /* */ comments to // comments where possible" ;
53
53
license_template_path: String , String :: default ( ) , false ,
54
54
"Beginning of file must match license template" ;
55
55
format_strings: bool , false , false , "Format string literals where necessary" ;
56
+ format_macro_matchers: bool , true , false ,
57
+ "Format the metavariable matching patterns in macros" ;
58
+ format_macro_bodies: bool , true , false , "Format the bodies of macros" ;
56
59
57
60
// Single line expressions and items
58
61
empty_item_single_line: bool , true , false ,
@@ -79,13 +82,13 @@ create_config! {
79
82
space_after_colon: bool , true , false , "Leave a space after the colon" ;
80
83
spaces_around_ranges: bool , false , false , "Put spaces around the .. and ..= range operators" ;
81
84
binop_separator: SeparatorPlace , SeparatorPlace :: Front , false ,
82
- "Where to put a binary operator when a binary expression goes multiline. " ;
85
+ "Where to put a binary operator when a binary expression goes multiline" ;
83
86
84
87
// Misc.
85
- remove_nested_parens: bool , true , true , "Remove nested parens. " ;
86
- combine_control_expr: bool , true , false , "Combine control expressions with function calls. " ;
88
+ remove_nested_parens: bool , true , true , "Remove nested parens" ;
89
+ combine_control_expr: bool , true , false , "Combine control expressions with function calls" ;
87
90
struct_field_align_threshold: usize , 0 , false , "Align struct fields if their diffs fits within \
88
- threshold. ";
91
+ threshold";
89
92
match_arm_blocks: bool , true , false , "Wrap the body of arms in blocks when it does not fit on \
90
93
the same line with the pattern of arms";
91
94
force_multiline_blocks: bool , false , false ,
@@ -101,10 +104,10 @@ create_config! {
101
104
match_block_trailing_comma: bool , false , false ,
102
105
"Put a trailing comma after a block based match arm (non-block arms are not affected)" ;
103
106
blank_lines_upper_bound: usize , 1 , false ,
104
- "Maximum number of blank lines which can be put between items. " ;
107
+ "Maximum number of blank lines which can be put between items" ;
105
108
blank_lines_lower_bound: usize , 0 , false ,
106
- "Minimum number of blank lines which must be put between items. " ;
107
- edition: Edition , Edition :: Edition2015 , false , "The edition of the parser. (RFC 2052)" ;
109
+ "Minimum number of blank lines which must be put between items" ;
110
+ edition: Edition , Edition :: Edition2015 , false , "The edition of the parser (RFC 2052)" ;
108
111
109
112
// Options that can change the source code beyond whitespace/blocks (somewhat linty things)
110
113
merge_derives: bool , true , true , "Merge multiple `#[derive(...)]` into a single one" ;
@@ -118,7 +121,7 @@ create_config! {
118
121
color: Color , Color :: Auto , false ,
119
122
"What Color option to use when none is supplied: Always, Never, Auto" ;
120
123
required_version: String , env!( "CARGO_PKG_VERSION" ) . to_owned( ) , false ,
121
- "Require a specific version of rustfmt. " ;
124
+ "Require a specific version of rustfmt" ;
122
125
unstable_features: bool , false , false ,
123
126
"Enables unstable features. Only available on nightly channel" ;
124
127
disable_all_formatting: bool , false , false , "Don't reformat anything" ;
@@ -133,7 +136,7 @@ create_config! {
133
136
report_fixme: ReportTactic , ReportTactic :: Never , false ,
134
137
"Report all, none or unnumbered occurrences of FIXME in source file comments" ;
135
138
ignore: IgnoreList , IgnoreList :: default ( ) , false ,
136
- "Skip formatting the specified files and directories. " ;
139
+ "Skip formatting the specified files and directories" ;
137
140
138
141
// Not user-facing
139
142
verbose: Verbosity , Verbosity :: Normal , false , "How much to information to emit to the user" ;
0 commit comments