]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/width-heuristics.rs
Rollup merge of #107166 - petrochenkov:nooptable, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / source / width-heuristics.rs
1 // rustfmt-max_width: 120
2
3 // elems on multiple lines for max_width 100, but same line for max_width 120
4 fn foo(e: Enum) {
5     match e {
6         Enum::Var {
7             elem1,
8             elem2,
9             elem3,
10         } => {
11             return;
12         }
13     }
14 }
15
16 // elems not on same line for either max_width 100 or 120
17 fn bar(e: Enum) {
18     match e {
19         Enum::Var {
20             elem1,
21             elem2,
22             elem3,
23             elem4,
24         } => {
25             return;
26         }
27     }
28 }