1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
// use std::marker::PhantomData;
// use super::*;
// #[allow(non_camel_case_types, dead_code)]
// mod _priv {
// use super::*;
// pub(super) trait Intersection_1_1<A1, B1>: Subset<(A1,)> + Subset<(B1,)> {}
// pub(super) trait Intersection2<A1, A2>: Subset<(A1, A2)> + Subset<(A1,)> {}
// pub(super) trait Intersection2_1<A1, A2, B1>:
// Intersection2<A1, A2> + Subset<(B1,)>
// {
// }
// pub(super) trait Intersection2_2<A1, A2, B1, B2>:
// Intersection2<A1, A2> + Intersection_1_1<B1, B2>
// {
// }
// pub(super) trait Intersection3<A1, A2, A3>:
// Subset<(A1, A2, A3)> + Intersection2<A1, A2>
// {
// }
// pub(super) trait Intersection3_1<A1, A2, A3, B1>:
// Intersection3<A1, A2, A3> + Subset<(B1,)>
// {
// }
// pub(super) trait Intersection3_2<A1, A2, A3, B1, B2>:
// Intersection3<A1, A2, A3> + Intersection_1_1<B1, B2>
// {
// }
// pub(super) trait Intersection3_3<A1, A2, A3, B1, B2, B3>:
// Intersection3<A1, A2, A3> + Intersection3<B1, B2, B3>
// {
// }
// pub(super) trait Intersection4<A1, A2, A3, A4>:
// Subset<(A1, A2, A3, A4)> + Intersection3<A1, A2, A3>
// {
// }
// pub(super) trait Intersection4_1<A1, A2, A3, A4, B1>:
// Intersection4<A1, A2, A3, A4> + Subset<(B1,)>
// {
// }
// pub(super) trait Intersection4_2<A1, A2, A3, A4, B1, B2>:
// Intersection4<A1, A2, A3, A4> + Intersection_1_1<B1, B2>
// {
// }
// pub(super) trait Intersection4_3<A1, A2, A3, A4, B1, B2, B3>:
// Intersection4<A1, A2, A3, A4> + Intersection3<B1, B2, B3>
// {
// }
// pub(super) trait Intersection4_4<A1, A2, A3, A4, B1, B2, B3, B4>:
// Intersection4<A1, A2, A3, A4> + Intersection4<B1, B2, B3, B4>
// {
// }
// }
// use _priv::*;
// pub trait IntersectionEmpty<R>: Sized
// where
// Intersection<Self, R>: Subset<()>,
// {
// }
// pub struct Intersection<T, R>(PhantomData<(T, R)>);
// impl<T, R, E> Contains1<E> for Intersection<T, R>
// where
// T: Contains1<E>,
// R: Contains1<E>,
// {
// }
// // ------------------ 0 -----------------------
// impl<S> Subset<S> for Intersection<(), ()> {}
// // ------------------ 1 -----------------------
// impl<S, A1> Subset<S> for Intersection<(A1,), ()> where (A1,): Subset<S> {}
// impl<S, B1> Subset<S> for Intersection<(), (B1,)> where (B1,): Subset<S> {}
// impl<S, A1, B1> Subset<S> for Intersection<(A1,), (B1,)> where
// dyn Intersection_1_1<A1, B1>: Subset<S>
// {
// }
// // ------------------ 2 -----------------------
// impl<S, A1, A2> Subset<S> for Intersection<(A1, A2), ()> where dyn Intersection2<A1, A2>: Subset<S> {}
// impl<S, B1, B2> Subset<S> for Intersection<(), (B1, B2)> where dyn Intersection2<B1, B2>: Subset<S> {}
// impl<S, A1, A2, B1> Subset<S> for Intersection<(A1, A2), (B1,)> where
// dyn Intersection2_1<A1, A2, B1>: Subset<S>
// {
// }
// impl<S, A1, B1, B2> Subset<S> for Intersection<(A1,), (B1, B2)> where
// dyn Intersection2_1<B1, B2, A1>: Subset<S>
// {
// }
// impl<S, A1, A2, B1, B2> Subset<S> for Intersection<(A1, A2), (B1, B2)> where
// dyn Intersection2_2<A1, A2, B1, B2>: Subset<S>
// {
// }
// // ------------------ 3 -----------------------
// impl<S, A1, A2, A3> Subset<S> for Intersection<(A1, A2, A3), ()> where
// dyn Intersection3<A1, A2, A3>: Subset<S>
// {
// }
// impl<S, B1, B2, B3> Subset<S> for Intersection<(), (B1, B2, B3)> where
// dyn Intersection3<B1, B2, B3>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, B1> Subset<S> for Intersection<(A1, A2, A3), (B1,)> where
// dyn Intersection3_1<A1, A2, A3, B1>: Subset<S>
// {
// }
// impl<S, A1, B1, B2, B3> Subset<S> for Intersection<(A1,), (B1, B2, B3)> where
// dyn Intersection3_1<B1, B2, B3, A1>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, B1, B2> Subset<S> for Intersection<(A1, A2, A3), (B1, B2)> where
// dyn Intersection3_2<A1, A2, A3, B1, B2>: Subset<S>
// {
// }
// impl<S, A1, A2, B1, B2, B3> Subset<S> for Intersection<(A1, A2), (B1, B2, B3)> where
// dyn Intersection3_2<B1, B2, B3, A1, A2>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, B1, B2, B3> Subset<S> for Intersection<(A1, A2, A3), (B1, B2, B3)> where
// dyn Intersection3_3<A1, A2, A3, B1, B2, B3>: Subset<S>
// {
// }
// // ------------------ 4 -----------------------
// impl<S, A1, A2, A3, A4> Subset<S> for Intersection<(A1, A2, A3, A4), ()> where
// dyn Intersection4<A1, A2, A3, A4>: Subset<S>
// {
// }
// impl<S, B1, B2, B3, B4> Subset<S> for Intersection<(), (B1, B2, B3, B4)> where
// dyn Intersection4<B1, B2, B3, B4>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, A4, B1> Subset<S> for Intersection<(A1, A2, A3, A4), (B1,)> where
// dyn Intersection4_1<A1, A2, A3, A4, B1>: Subset<S>
// {
// }
// impl<S, A1, B1, B2, B3, B4> Subset<S> for Intersection<(A1,), (B1, B2, B3, B4)> where
// dyn Intersection4_1<B1, B2, B3, B4, A1>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, A4, B1, B2> Subset<S> for Intersection<(A1, A2, A3, A4), (B1, B2)> where
// dyn Intersection4_2<A1, A2, A3, A4, B1, B2>: Subset<S>
// {
// }
// impl<S, A1, A2, B1, B2, B3, B4> Subset<S> for Intersection<(A1, A2), (B1, B2, B3, B4)> where
// dyn Intersection4_2<B1, B2, B3, B4, A1, A2>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, A4, B1, B2, B3> Subset<S> for Intersection<(A1, A2, A3, A4), (B1, B2, B3)> where
// dyn Intersection4_3<A1, A2, A3, A4, B1, B2, B3>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, B1, B2, B3, B4> Subset<S> for Intersection<(A1, A2, A3), (B1, B2, B3, B4)> where
// dyn Intersection4_3<B1, B2, B3, B4, A1, A2, A3>: Subset<S>
// {
// }
// impl<S, A1, A2, A3, A4, B1, B2, B3, B4> Subset<S>
// for Intersection<(A1, A2, A3, A4), (B1, B2, B3, B4)>
// where
// dyn Intersection4_4<A1, A2, A3, A4, B1, B2, B3, B4>: Subset<S>,
// {
// }