]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/match-block-trailing-comma.rs
Merge commit 'd822110d3b5625b9dc80ccc442e06fc3cc851d76' into clippyup
[rust.git] / src / tools / rustfmt / tests / target / match-block-trailing-comma.rs
1 // rustfmt-match_block_trailing_comma: true
2 // Match expressions, no unwrapping of block arms or wrapping of multiline
3 // expressions.
4
5 fn foo() {
6     match x {
7         a => {
8             "line1";
9             "line2"
10         },
11         ThisIsA::Guard if true => {
12             "line1";
13             "line2"
14         },
15         ThisIsA::ReallyLongPattern(ThatWillForce::TheGuard, ToWrapOnto::TheFollowingLine)
16             if true =>
17         {
18             "line1";
19             "line2"
20         },
21         b => (
22             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
23             bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
24         ),
25     }
26 }