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