Skip to content

Commit c6447e6

Browse files
committed
rename fn_args_density configuration option to fn_args_layout
1 parent 566a101 commit c6447e6

File tree

17 files changed

+18
-18
lines changed

17 files changed

+18
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Change option `format_doc_comment` to `format_code_in_doc_comment`.
88
- `use_small_heuristics` changed to be an enum and stabilised. Configuration
99
options are now ready for 1.0.
10-
- Stabilise `fn_args_density` configuration option #3581
10+
- Stabilise `fn_args_density` configuration option and rename it to `fn_args_layout` #3581
1111

1212
## [1.2.2] 2019-04-24
1313

Configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ trailing whitespaces.
629629
- **Possible values**: `true`, `false`
630630
- **Stable**: No (tracking issue: #3392)
631631

632-
## `fn_args_density`
632+
## `fn_args_layout`
633633

634634
Argument density in functions
635635

src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ create_config! {
9292
the same line with the pattern of arms";
9393
force_multiline_blocks: bool, false, false,
9494
"Force multiline closure bodies and match arms to be wrapped in a block";
95-
fn_args_density: Density, Density::Tall, true, "Argument density in functions";
95+
fn_args_layout: Density, Density::Tall, true, "Argument density in functions";
9696
brace_style: BraceStyle, BraceStyle::SameLineWhere, false, "Brace style for items";
9797
control_brace_style: ControlBraceStyle, ControlBraceStyle::AlwaysSameLine, false,
9898
"Brace style for control flow constructs";
@@ -501,7 +501,7 @@ struct_field_align_threshold = 0
501501
enum_discrim_align_threshold = 0
502502
match_arm_blocks = true
503503
force_multiline_blocks = false
504-
fn_args_density = "Tall"
504+
fn_args_layout = "Tall"
505505
brace_style = "SameLineWhere"
506506
control_brace_style = "AlwaysSameLine"
507507
trailing_semicolon = true

src/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ fn rewrite_args(
23182318
&arg_items,
23192319
context
23202320
.config
2321-
.fn_args_density()
2321+
.fn_args_layout()
23222322
.to_list_tactic(arg_items.len()),
23232323
Separator::Comma,
23242324
one_line_budget,

tests/config/small_tabs.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ comment_width = 80
33
tab_spaces = 2
44
newline_style = "Unix"
55
brace_style = "SameLineWhere"
6-
fn_args_density = "Tall"
6+
fn_args_layout = "Tall"
77
trailing_comma = "Vertical"
88
indent_style = "Block"
99
report_todo = "Always"

tests/source/configs/fn_args_density/compressed.rs renamed to tests/source/configs/fn_args_layout/compressed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Compressed
1+
// rustfmt-fn_args_layout: Compressed
22
// Function arguments density
33

44
trait Lorem {

tests/source/configs/fn_args_density/tall.rs renamed to tests/source/configs/fn_args_layout/tall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Tall
1+
// rustfmt-fn_args_layout: Tall
22
// Function arguments density
33

44
trait Lorem {

tests/source/configs/fn_args_density/vertical.rs renamed to tests/source/configs/fn_args_layout/vertical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Vertical
1+
// rustfmt-fn_args_layout: Vertical
22
// Function arguments density
33

44
trait Lorem {

tests/source/fn-custom-7.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-normalize_comments: true
2-
// rustfmt-fn_args_density: Vertical
2+
// rustfmt-fn_args_layout: Vertical
33
// rustfmt-brace_style: AlwaysNextLine
44

55
// Case with only one variable.

tests/source/fn-custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Compressed
1+
// rustfmt-fn_args_layout: Compressed
22
// Test some of the ways function signatures can be customised.
33

44
// Test compressed layout of args.

tests/source/fn_args_density-vertical.rs renamed to tests/source/fn_args_layout-vertical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Vertical
1+
// rustfmt-fn_args_layout: Vertical
22

33
// Empty list should stay on one line.
44
fn do_bar(

tests/target/configs/fn_args_density/compressed.rs renamed to tests/target/configs/fn_args_layout/compressed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Compressed
1+
// rustfmt-fn_args_layout: Compressed
22
// Function arguments density
33

44
trait Lorem {

tests/target/configs/fn_args_density/tall.rs renamed to tests/target/configs/fn_args_layout/tall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Tall
1+
// rustfmt-fn_args_layout: Tall
22
// Function arguments density
33

44
trait Lorem {

tests/target/configs/fn_args_density/vertical.rs renamed to tests/target/configs/fn_args_layout/vertical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Vertical
1+
// rustfmt-fn_args_layout: Vertical
22
// Function arguments density
33

44
trait Lorem {

tests/target/fn-custom-7.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// rustfmt-normalize_comments: true
2-
// rustfmt-fn_args_density: Vertical
2+
// rustfmt-fn_args_layout: Vertical
33
// rustfmt-brace_style: AlwaysNextLine
44

55
// Case with only one variable.

tests/target/fn-custom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Compressed
1+
// rustfmt-fn_args_layout: Compressed
22
// Test some of the ways function signatures can be customised.
33

44
// Test compressed layout of args.

tests/target/fn_args_density-vertical.rs renamed to tests/target/fn_args_layout-vertical.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-fn_args_density: Vertical
1+
// rustfmt-fn_args_layout: Vertical
22

33
// Empty list should stay on one line.
44
fn do_bar() -> u8 {

0 commit comments

Comments
 (0)