]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/width-heuristics.rs
Rollup merge of #95040 - frank-king:fix/94981, r=Mark-Simulacrum
[rust.git] / src / tools / rustfmt / tests / target / 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 { elem1, elem2, elem3 } => {
7             return;
8         }
9     }
10 }
11
12 // elems not on same line for either max_width 100 or 120
13 fn bar(e: Enum) {
14     match e {
15         Enum::Var {
16             elem1,
17             elem2,
18             elem3,
19             elem4,
20         } => {
21             return;
22         }
23     }
24 }