]> git.lizzy.rs Git - rust.git/blob - tests/target/item-brace-style-same-line-where.rs
Combine fn_brace_style and item_brace_style
[rust.git] / tests / target / item-brace-style-same-line-where.rs
1 // rustfmt-brace_style: SameLineWhere
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>
18     where
19         T: Copy,
20     {
21         A,
22     }
23
24     struct B<T>
25     where
26         T: Copy,
27     {
28         b: i32,
29     }
30
31     // For empty enums and structs, the brace remains on the same line.
32     enum C<T>
33     where
34         T: Copy, {}
35
36     struct D<T>
37     where
38         T: Copy, {}
39 }