@@ -43,19 +43,19 @@ create_config! {
43
43
hard_tabs: bool , false , true , "Use tab characters for indentation, spaces for alignment" ;
44
44
tab_spaces: usize , 4 , true , "Number of spaces per tab" ;
45
45
newline_style: NewlineStyle , NewlineStyle :: Unix , true , "Unix or Windows line endings" ;
46
- indent_style: IndentStyle , IndentStyle :: Block , false , "How do we indent expressions or items." ;
47
46
use_small_heuristics: bool , true , false , "Whether to use different formatting for items and \
48
47
expressions if they satisfy a heuristic notion of 'small'.";
48
+ indent_style: IndentStyle , IndentStyle :: Block , false , "How do we indent expressions or items." ;
49
49
50
- // strings and comments
51
- format_strings: bool , false , false , "Format string literals where necessary" ;
50
+ // Comments and strings
52
51
wrap_comments: bool , false , true , "Break comments to fit on the line" ;
53
52
comment_width: usize , 80 , false ,
54
53
"Maximum length of comments. No effect unless wrap_comments = true" ;
55
54
normalize_comments: bool , false , true , "Convert /* */ comments to // comments where possible" ;
56
55
license_template_path: String , String :: default ( ) , false , "Beginning of file must match license template" ;
56
+ format_strings: bool , false , false , "Format string literals where necessary" ;
57
57
58
- // Single line expressions and items.
58
+ // Single line expressions and items
59
59
empty_item_single_line: bool , true , false ,
60
60
"Put empty-body functions and impls on a single line" ;
61
61
struct_lit_single_line: bool , true , false ,
@@ -78,22 +78,22 @@ create_config! {
78
78
reorder_impl_items: bool , false , false , "Reorder impl items" ;
79
79
80
80
// Spaces around punctuation
81
- binop_separator: SeparatorPlace , SeparatorPlace :: Front , false ,
82
- "Where to put a binary operator when a binary expression goes multiline." ;
83
81
type_punctuation_density: TypeDensity , TypeDensity :: Wide , false ,
84
82
"Determines if '+' or '=' are wrapped in spaces in the punctuation of types" ;
85
83
space_before_colon: bool , false , false , "Leave a space before the colon" ;
86
84
space_after_colon: bool , true , false , "Leave a space after the colon" ;
87
85
spaces_around_ranges: bool , false , false , "Put spaces around the .. and ... range operators" ;
88
86
spaces_within_parens_and_brackets: bool , false , false ,
89
87
"Put spaces within non-empty parentheses or brackets" ;
88
+ binop_separator: SeparatorPlace , SeparatorPlace :: Front , false ,
89
+ "Where to put a binary operator when a binary expression goes multiline." ;
90
90
91
91
// Misc.
92
+ remove_blank_lines_at_start_or_end_of_block: bool , true , false ,
93
+ "Remove blank lines at start or end of a block" ;
92
94
combine_control_expr: bool , true , false , "Combine control expressions with function calls." ;
93
95
struct_field_align_threshold: usize , 0 , false , "Align struct fields if their diffs fits within \
94
96
threshold.";
95
- remove_blank_lines_at_start_or_end_of_block: bool , true , false ,
96
- "Remove blank lines at start or end of a block" ;
97
97
match_arm_blocks: bool , true , false , "Wrap the body of arms in blocks when it does not fit on \
98
98
the same line with the pattern of arms";
99
99
force_multiline_blocks: bool , false , false ,
@@ -102,10 +102,10 @@ create_config! {
102
102
brace_style: BraceStyle , BraceStyle :: SameLineWhere , false , "Brace style for items" ;
103
103
control_brace_style: ControlBraceStyle , ControlBraceStyle :: AlwaysSameLine , false ,
104
104
"Brace style for control flow constructs" ;
105
- trailing_comma: SeparatorTactic , SeparatorTactic :: Vertical , false ,
106
- "How to handle trailing commas for lists" ;
107
105
trailing_semicolon: bool , true , false ,
108
106
"Add trailing semicolon after break, continue and return" ;
107
+ trailing_comma: SeparatorTactic , SeparatorTactic :: Vertical , false ,
108
+ "How to handle trailing commas for lists" ;
109
109
match_block_trailing_comma: bool , false , false ,
110
110
"Put a trailing comma after a block based match arm (non-block arms are not affected)" ;
111
111
blank_lines_upper_bound: usize , 1 , false ,
@@ -145,7 +145,7 @@ create_config! {
145
145
ignore: IgnoreList , IgnoreList :: default ( ) , false ,
146
146
"Skip formatting the specified files and directories." ;
147
147
148
- // Not user-facing.
148
+ // Not user-facing
149
149
verbose: bool , false , false , "Use verbose output" ;
150
150
file_lines: FileLines , FileLines :: all( ) , false ,
151
151
"Lines to format; this is not supported in rustfmt.toml, and can only be specified \
0 commit comments