]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/issue-4926/deeply_nested_struct_with_long_field_names.rs
Rollup merge of #89876 - AlexApps99:const_ops, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / source / issue-4926 / deeply_nested_struct_with_long_field_names.rs
1 // rustfmt-struct_field_align_threshold: 30
2
3 struct X {
4     really_really_long_field_a: i32,
5     really_really_really_long_field_b: i32,
6     really_really_really_really_long_field_c: i32,
7     really_really_really_really_really_long_field_d: i32,
8     really_really_really_really_really_really_long_field_e: i32,
9     f: i32,
10 }
11
12 fn test(x: X) {
13     let d = {
14         let e = {
15             let f = {
16                 let g = {
17                     let h = {
18                         let i = {
19                             let j = {
20                                 matches!(
21                                     x,
22                                     X {
23                                         really_really_long_field_a: 10,
24                                         really_really_really_long_field_b: 10,
25                                         really_really_really_really_long_field_c: 10,
26                                         really_really_really_really_really_long_field_d: 10,
27                                         really_really_really_really_really_really_long_field_e: 10, ..
28                                     }
29                                 )
30                             };
31                             j
32                         };
33                         i
34                     };
35                     h
36                 };
37                 g
38             };
39             f
40         };
41         e
42     };
43 }