]> git.lizzy.rs Git - rust.git/blob - tests/target/trailing_commas.rs
Reformat tests
[rust.git] / tests / target / trailing_commas.rs
1 // rustfmt-match_block_trailing_comma: true
2 // rustfmt-trailing_comma: Always
3
4 fn main() {
5     match foo {
6         x => {},
7         y => {
8             foo();
9         },
10         _ => x,
11     }
12 }
13
14 fn f<S, T>(x: T, y: S) -> T
15 where
16     T: P,
17     S: Q,
18 {
19     x
20 }
21
22 impl Trait for T
23 where
24     T: P,
25 {
26     fn f(x: T) -> T
27     where
28         T: Q + R,
29     {
30         x
31     }
32 }
33
34 struct Pair<S, T>
35 where
36     T: P,
37     S: P + Q,
38 {
39     a: T,
40     b: S,
41 }
42
43 struct TupPair<S, T>(S, T)
44 where
45     T: P,
46     S: P + Q;
47
48 enum E<S, T>
49 where
50     S: P,
51     T: P,
52 {
53     A { a: T, },
54 }
55
56 type Double<T> where
57     T: P,
58     T: Q = Pair<T, T>;
59
60 extern "C" {
61     fn f<S, T>(x: T, y: S) -> T
62     where
63         T: P,
64         S: Q;
65 }
66
67 trait Q<S, T>
68 where
69     T: P,
70     S: R,
71 {
72     fn f<U, V>(self, x: T, y: S, z: U) -> Self
73     where
74         U: P,
75         V: P;
76 }