]> git.proxmox.com Git - rustc.git/blob - src/tools/rustfmt/tests/source/width-heuristics.rs
New upstream version 1.49.0+dfsg1
[rustc.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 }