summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/item-brace-style-same-line-where.rs
blob: 1d034089f694de28e8aa347c4cb6be97675b23d5 (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
mod M {
    enum A
    {
        A,
    }

    struct B
    {
        b: i32,
    }

    // For empty enums and structs, the brace remains on the same line.
    enum C {}

    struct D {}

    enum A<T> where T: Copy {
        A,
    }

    struct B<T> where T: Copy {
        b: i32,
    }

    // For empty enums and structs, the brace remains on the same line.
    enum C<T> where T: Copy {}

    struct D<T> where T: Copy {}
}