summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-4926/deeply_nested_struct_with_long_field_names.rs
blob: c7bc7f7296d6b542ac59a9123e196afedb8f5bb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// rustfmt-struct_field_align_threshold: 30

struct X {
    really_really_long_field_a: i32,
    really_really_really_long_field_b: i32,
    really_really_really_really_long_field_c: i32,
    really_really_really_really_really_long_field_d: i32,
    really_really_really_really_really_really_long_field_e: i32,
    f: i32,
}

fn test(x: X) {
    let d = {
        let e = {
            let f = {
                let g = {
                    let h = {
                        let i = {
                            let j = {
                                matches!(
                                    x,
                                    X {
                                        really_really_long_field_a: 10,
                                        really_really_really_long_field_b: 10,
                                        really_really_really_really_long_field_c: 10,
                                        really_really_really_really_really_long_field_d: 10,
                                        really_really_really_really_really_really_long_field_e: 10,
                                        ..
                                    }
                                )
                            };
                            j
                        };
                        i
                    };
                    h
                };
                g
            };
            f
        };
        e
    };
}