]> git.lizzy.rs Git - rust.git/blob - tests/source/configs-match_arm_forces_newline-true.rs
Merge pull request #2090 from topecongiro/issue-2087
[rust.git] / tests / source / configs-match_arm_forces_newline-true.rs
1 // rustfmt-match_arm_forces_newline: true
2 // rustfmt-wrap_match_arms: false
3
4 // match_arm_forces_newline puts all match arms bodies in a newline and indents
5 // them.
6
7 fn main() {
8     match x() {
9         // a short non-empty block
10         X0 => { f(); }
11         // a long non-empty block
12         X1 => { some.really.long.expression.fooooooooooooooooooooooooooooooooooooooooo().baaaaarrrrrrrrrrrrrrrrrrrrrrrrrr(); }
13         // an empty block
14         X2 => {}
15         // a short non-block
16         X3 => println!("ok"),
17         // a long non-block
18         X4 => foo.bar.baz.test.x.y.z.a.s.d.fasdfasdf.asfads.fasd.fasdfasdf.dfasfdsaf(),
19     }
20 }