Skip to content

Commit 48e5bc1

Browse files
committed
Reorder config options
cc #1974
1 parent 7822d0c commit 48e5bc1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/config/mod.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ create_config! {
4343
hard_tabs: bool, false, true, "Use tab characters for indentation, spaces for alignment";
4444
tab_spaces: usize, 4, true, "Number of spaces per tab";
4545
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.";
4746
use_small_heuristics: bool, true, false, "Whether to use different formatting for items and \
4847
expressions if they satisfy a heuristic notion of 'small'.";
48+
indent_style: IndentStyle, IndentStyle::Block, false, "How do we indent expressions or items.";
4949

50-
// strings and comments
51-
format_strings: bool, false, false, "Format string literals where necessary";
50+
// Comments and strings
5251
wrap_comments: bool, false, true, "Break comments to fit on the line";
5352
comment_width: usize, 80, false,
5453
"Maximum length of comments. No effect unless wrap_comments = true";
5554
normalize_comments: bool, false, true, "Convert /* */ comments to // comments where possible";
5655
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";
5757

58-
// Single line expressions and items.
58+
// Single line expressions and items
5959
empty_item_single_line: bool, true, false,
6060
"Put empty-body functions and impls on a single line";
6161
struct_lit_single_line: bool, true, false,
@@ -78,22 +78,22 @@ create_config! {
7878
reorder_impl_items: bool, false, false, "Reorder impl items";
7979

8080
// Spaces around punctuation
81-
binop_separator: SeparatorPlace, SeparatorPlace::Front, false,
82-
"Where to put a binary operator when a binary expression goes multiline.";
8381
type_punctuation_density: TypeDensity, TypeDensity::Wide, false,
8482
"Determines if '+' or '=' are wrapped in spaces in the punctuation of types";
8583
space_before_colon: bool, false, false, "Leave a space before the colon";
8684
space_after_colon: bool, true, false, "Leave a space after the colon";
8785
spaces_around_ranges: bool, false, false, "Put spaces around the .. and ... range operators";
8886
spaces_within_parens_and_brackets: bool, false, false,
8987
"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.";
9090

9191
// 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";
9294
combine_control_expr: bool, true, false, "Combine control expressions with function calls.";
9395
struct_field_align_threshold: usize, 0, false, "Align struct fields if their diffs fits within \
9496
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";
9797
match_arm_blocks: bool, true, false, "Wrap the body of arms in blocks when it does not fit on \
9898
the same line with the pattern of arms";
9999
force_multiline_blocks: bool, false, false,
@@ -102,10 +102,10 @@ create_config! {
102102
brace_style: BraceStyle, BraceStyle::SameLineWhere, false, "Brace style for items";
103103
control_brace_style: ControlBraceStyle, ControlBraceStyle::AlwaysSameLine, false,
104104
"Brace style for control flow constructs";
105-
trailing_comma: SeparatorTactic, SeparatorTactic::Vertical, false,
106-
"How to handle trailing commas for lists";
107105
trailing_semicolon: bool, true, false,
108106
"Add trailing semicolon after break, continue and return";
107+
trailing_comma: SeparatorTactic, SeparatorTactic::Vertical, false,
108+
"How to handle trailing commas for lists";
109109
match_block_trailing_comma: bool, false, false,
110110
"Put a trailing comma after a block based match arm (non-block arms are not affected)";
111111
blank_lines_upper_bound: usize, 1, false,
@@ -145,7 +145,7 @@ create_config! {
145145
ignore: IgnoreList, IgnoreList::default(), false,
146146
"Skip formatting the specified files and directories.";
147147

148-
// Not user-facing.
148+
// Not user-facing
149149
verbose: bool, false, false, "Use verbose output";
150150
file_lines: FileLines, FileLines::all(), false,
151151
"Lines to format; this is not supported in rustfmt.toml, and can only be specified \

0 commit comments

Comments
 (0)