summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/item-brace-style-same-line-where.rs
blob: fabe5822c89c8446ac12914fe9184db957669219 (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
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, {}
}