]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-4926/deeply_nested_struct_with_many_fields.rs
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / target / issue-4926 / deeply_nested_struct_with_many_fields.rs
1 // rustfmt-struct_field_align_threshold: 30
2
3 struct X {
4     a: i32,
5     b: i32,
6     c: i32,
7     d: i32,
8     e: i32,
9     f: i32,
10     g: i32,
11     h: i32,
12     i: i32,
13     j: i32,
14     k: i32,
15 }
16
17 fn test(x: X) {
18     let d = {
19         let e = {
20             let f = {
21                 let g = {
22                     let h = {
23                         let i = {
24                             let j = {
25                                 matches!(
26                                     x,
27                                     X {
28                                         a: 1_000,
29                                         b: 1_000,
30                                         c: 1_000,
31                                         d: 1_000,
32                                         e: 1_000,
33                                         f: 1_000,
34                                         g: 1_000,
35                                         h: 1_000,
36                                         i: 1_000,
37                                         j: 1_000,
38                                         ..
39                                     }
40                                 )
41                             };
42                             j
43                         };
44                         i
45                     };
46                     h
47                 };
48                 g
49             };
50             f
51         };
52         e
53     };
54 }