]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/target/item-brace-style-always-next-line.rs
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / tools / rustfmt / tests / target / item-brace-style-always-next-line.rs
CommitLineData
f20569fa
XL
1// rustfmt-brace_style: AlwaysNextLine
2
3mod 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}
3c0e092e
XL
43
44fn function() {}
45
46trait Trait {}
47
48impl<T> Trait for T {}
49
50trait Trait2<T>
51where
52 T: Copy + Display + Write + Read + FromStr,
53{
54}
55
56trait Trait3<T>
57where
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}