]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/item-brace-style-always-next-line.rs
Rollup merge of #95040 - frank-king:fix/94981, r=Mark-Simulacrum
[rust.git] / src / tools / rustfmt / tests / target / item-brace-style-always-next-line.rs
1 // rustfmt-brace_style: AlwaysNextLine
2
3 mod M
4 {
5     enum A
6     {
7         A,
8     }
9
10     struct B
11     {
12         b: i32,
13     }
14
15     // For empty enums and structs, the brace remains on the same line.
16     enum C {}
17
18     struct D {}
19
20     enum A<T>
21     where
22         T: Copy,
23     {
24         A,
25     }
26
27     struct B<T>
28     where
29         T: Copy,
30     {
31         b: i32,
32     }
33
34     // For empty enums and structs, the brace remains on the same line.
35     enum C<T>
36     where
37         T: Copy, {}
38
39     struct D<T>
40     where
41         T: Copy, {}
42 }
43
44 fn function() {}
45
46 trait Trait {}
47
48 impl<T> Trait for T {}
49
50 trait Trait2<T>
51 where
52     T: Copy + Display + Write + Read + FromStr,
53 {
54 }
55
56 trait Trait3<T>
57 where
58     T: Something
59         + SomethingElse
60         + Sync
61         + Send
62         + Display
63         + Debug
64         + Copy
65         + Hash
66         + Debug
67         + Display
68         + Write
69         + Read,
70 {
71 }