Add Configurations.md section
This commit is contained in:
parent
84bea05719
commit
48bdecf99d
1 changed files with 42 additions and 0 deletions
|
|
@ -1229,6 +1229,48 @@ struct Dolor<T>
|
|||
}
|
||||
```
|
||||
|
||||
## `match_arm_forces_newline`
|
||||
|
||||
Consistently put match arms (block based or not) in a newline.
|
||||
|
||||
- **Default value**: `false`
|
||||
- **Possible values**: `true`, `false`
|
||||
|
||||
#### `false` (default):
|
||||
|
||||
```rust
|
||||
match x {
|
||||
// a non-empty block
|
||||
X0 => {
|
||||
f();
|
||||
}
|
||||
// an empty block
|
||||
X1 => {}
|
||||
// a non-block
|
||||
X2 => println!("ok"),
|
||||
}
|
||||
```
|
||||
|
||||
#### `true`:
|
||||
|
||||
```rust
|
||||
match x {
|
||||
// a non-empty block
|
||||
X0 => {
|
||||
f();
|
||||
}
|
||||
// an empty block
|
||||
X1 =>
|
||||
{}
|
||||
// a non-block
|
||||
X2 => {
|
||||
println!("ok")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
See also: [`wrap_match_arms`](#wrap_match_arms).
|
||||
|
||||
## `match_block_trailing_comma`
|
||||
|
||||
Put a trailing comma after a block based match arm (non-block arms are not affected)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue