]> git.lizzy.rs Git - rust.git/blob - tests/target/where-trailing-comma.rs
Add visual indent tests for chains
[rust.git] / tests / target / where-trailing-comma.rs
1 // rustfmt-where_trailing_comma: true
2
3 fn f<S, T>(x: T, y: S) -> T
4     where T: P,
5           S: Q,
6 {
7     x
8 }
9
10 impl Trait for T
11     where T: P,
12 {
13     fn f(x: T) -> T
14         where T: Q + R,
15     {
16         x
17     }
18 }
19
20 struct Pair<S, T>
21     where T: P,
22           S: P + Q,
23 {
24     a: T,
25     b: S,
26 }
27
28 struct TupPair<S, T>(S, T)
29     where T: P,
30           S: P + Q;
31
32 enum E<S, T>
33     where S: P,
34           T: P,
35 {
36     A {
37         a: T,
38     },
39 }
40
41 type Double<T>
42     where T: P,
43           T: Q = Pair<T, T>;
44
45 extern "C" {
46     fn f<S, T>(x: T, y: S) -> T
47         where T: P,
48               S: Q;
49 }
50
51 trait Q<S, T>
52     where T: P,
53           S: R,
54 {
55     fn f<U, V>(self, x: T, y: S, z: U) -> Self
56         where U: P,
57               V: P;
58 }