mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +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
|
||||
|
||||
- **Default value**: `"Tall"`
|
||||
- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
|
||||
- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
|
||||
|
||||
#### `"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"`:
|
||||
|
||||
```rust
|
||||
|
@ -77,8 +77,6 @@ configuration_option_enum! { Density:
|
||||
Compressed,
|
||||
// Use more lines.
|
||||
Tall,
|
||||
// Try to compress if the body is empty.
|
||||
CompressedIfEmpty,
|
||||
// Place every item on a separate line.
|
||||
Vertical,
|
||||
}
|
||||
@ -95,7 +93,7 @@ impl Density {
|
||||
pub fn to_list_tactic(self) -> ListTactic {
|
||||
match self {
|
||||
Density::Compressed => ListTactic::Mixed,
|
||||
Density::Tall | Density::CompressedIfEmpty => ListTactic::HorizontalVertical,
|
||||
Density::Tall => ListTactic::HorizontalVertical,
|
||||
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