summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-4926/deeply_nested_struct.rs
blob: 072cf2f6674a1c81ec8b49a971dfda070eb5ec21 (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
// rustfmt-struct_field_align_threshold: 30

struct X {
    a: i32,
    b: i32,
    c: i32,
}

fn test(x: X) {
    let d = {
        let e = {
            let f = {
                let g = {
                    let h = {
                        let i = {
                            let j = {
                                matches!(
                                    x,
                                    X {
                                        a: 1_000,
                                        b: 1_000,
                                        ..
                                    }
                                )
                            };
                            j
                        };
                        i
                    };
                    h
                };
                g
            };
            f
        };
        e
    };
}