mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 04:39:16 +00:00
Remove CompressedIfEmpty option from fn_args_density
It was identical to Tall
This commit is contained in:
parent
677446e99d
commit
f0af1d4818
@ -636,7 +636,7 @@ See also [`comment_width`](#comment_width).
|
|||||||
Argument density in functions
|
Argument density in functions
|
||||||
|
|
||||||
- **Default value**: `"Tall"`
|
- **Default value**: `"Tall"`
|
||||||
- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
|
- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
|
||||||
|
|
||||||
#### `"Tall"` (default):
|
#### `"Tall"` (default):
|
||||||
|
|
||||||
@ -696,35 +696,6 @@ trait Lorem {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `"CompressedIfEmpty"`:
|
|
||||||
|
|
||||||
```rust
|
|
||||||
trait Lorem {
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
|
|
||||||
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
|
|
||||||
fn lorem(
|
|
||||||
ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
|
|
||||||
adipiscing: Adipiscing, elit: Elit,
|
|
||||||
);
|
|
||||||
|
|
||||||
fn lorem(
|
|
||||||
ipsum: Ipsum,
|
|
||||||
dolor: Dolor,
|
|
||||||
sit: Sit,
|
|
||||||
amet: Amet,
|
|
||||||
consectetur: Consectetur,
|
|
||||||
adipiscing: Adipiscing,
|
|
||||||
elit: Elit,
|
|
||||||
) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `"Vertical"`:
|
#### `"Vertical"`:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
@ -77,8 +77,6 @@ configuration_option_enum! { Density:
|
|||||||
Compressed,
|
Compressed,
|
||||||
// Use more lines.
|
// Use more lines.
|
||||||
Tall,
|
Tall,
|
||||||
// Try to compress if the body is empty.
|
|
||||||
CompressedIfEmpty,
|
|
||||||
// Place every item on a separate line.
|
// Place every item on a separate line.
|
||||||
Vertical,
|
Vertical,
|
||||||
}
|
}
|
||||||
@ -95,7 +93,7 @@ impl Density {
|
|||||||
pub fn to_list_tactic(self) -> ListTactic {
|
pub fn to_list_tactic(self) -> ListTactic {
|
||||||
match self {
|
match self {
|
||||||
Density::Compressed => ListTactic::Mixed,
|
Density::Compressed => ListTactic::Mixed,
|
||||||
Density::Tall | Density::CompressedIfEmpty => ListTactic::HorizontalVertical,
|
Density::Tall => ListTactic::HorizontalVertical,
|
||||||
Density::Vertical => ListTactic::Vertical,
|
Density::Vertical => ListTactic::Vertical,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
// rustfmt-fn_args_density: CompressedIfEmpty
|
|
||||||
// Function arguments density
|
|
||||||
|
|
||||||
trait Lorem {
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
|
|
||||||
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit);
|
|
||||||
|
|
||||||
// FIXME: Previous line should be formatted like this:
|
|
||||||
// fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
|
|
||||||
// adipiscing: Adipiscing, elit: Elit);
|
|
||||||
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
// rustfmt-fn_args_density: CompressedIfEmpty
|
|
||||||
// Function arguments density
|
|
||||||
|
|
||||||
trait Lorem {
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
|
|
||||||
|
|
||||||
fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
|
|
||||||
fn lorem(
|
|
||||||
ipsum: Ipsum,
|
|
||||||
dolor: Dolor,
|
|
||||||
sit: Sit,
|
|
||||||
amet: Amet,
|
|
||||||
consectetur: onsectetur,
|
|
||||||
adipiscing: Adipiscing,
|
|
||||||
elit: Elit,
|
|
||||||
);
|
|
||||||
|
|
||||||
// FIXME: Previous line should be formatted like this:
|
|
||||||
// fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
|
|
||||||
// adipiscing: Adipiscing, elit: Elit);
|
|
||||||
|
|
||||||
fn lorem(
|
|
||||||
ipsum: Ipsum,
|
|
||||||
dolor: Dolor,
|
|
||||||
sit: Sit,
|
|
||||||
amet: Amet,
|
|
||||||
consectetur: onsectetur,
|
|
||||||
adipiscing: Adipiscing,
|
|
||||||
elit: Elit,
|
|
||||||
) {
|
|
||||||
// body
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user