mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 01:55:03 +00:00
7ce887abcf
Updates the traling comma code to attempt to handle multiline non-block bodies when adding traling commas to blocks. Also add and update tests to cover better the interactions between trailing commas and wrapping match arms.
15 lines
388 B
Rust
15 lines
388 B
Rust
// rustfmt-match_block_trailing_comma: true
|
|
// Match expressions, no unwrapping of block arms or wrapping of multiline
|
|
// expressions.
|
|
|
|
fn foo() {
|
|
match x {
|
|
a => {
|
|
"line1";
|
|
"line2"
|
|
}
|
|
b => (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
|
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb),
|
|
}
|
|
}
|