summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/item-brace-style-always-next-line.rs
blob: 4935fac04f1111cec322b7443c9f7b58c2677eef (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// rustfmt-brace_style: AlwaysNextLine

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, {}
}

fn function() {}

trait Trait {}

impl<T> Trait for T {}

trait Trait2<T>
where
    T: Copy + Display + Write + Read + FromStr,
{
}

trait Trait3<T>
where
    T: Something
        + SomethingElse
        + Sync
        + Send
        + Display
        + Debug
        + Copy
        + Hash
        + Debug
        + Display
        + Write
        + Read,
{
}