@@ -148,7 +148,7 @@ macro_rules! tuple_impls {
148
148
$( fn $get_fn( & self ) -> $T; ) +
149
149
}
150
150
151
- impl <$( $T: Clone ) ,+> $cloneable_trait<$( $T) ,+> for ( $( $T) , +) {
151
+ impl <$( $T: Clone ) ,+> $cloneable_trait<$( $T) ,+> for ( $( $T, ) +) {
152
152
$(
153
153
#[ inline]
154
154
fn $get_fn( & self ) -> $T {
@@ -161,7 +161,7 @@ macro_rules! tuple_impls {
161
161
$( fn $get_ref_fn<' a>( & ' a self ) -> & ' a $T; ) +
162
162
}
163
163
164
- impl <$( $T) ,+> $immutable_trait<$( $T) ,+> for ( $( $T) , +) {
164
+ impl <$( $T) ,+> $immutable_trait<$( $T) ,+> for ( $( $T, ) +) {
165
165
$(
166
166
#[ inline]
167
167
fn $get_ref_fn<' a>( & ' a self ) -> & ' a $T {
@@ -170,59 +170,59 @@ macro_rules! tuple_impls {
170
170
) +
171
171
}
172
172
173
- impl <$( $T: Clone ) ,+> Clone for ( $( $T) , +) {
174
- fn clone( & self ) -> ( $( $T) , +) {
175
- ( $( self . $get_ref_fn( ) . clone( ) ) , +)
173
+ impl <$( $T: Clone ) ,+> Clone for ( $( $T, ) +) {
174
+ fn clone( & self ) -> ( $( $T, ) +) {
175
+ ( $( self . $get_ref_fn( ) . clone( ) , ) +)
176
176
}
177
177
}
178
178
179
179
#[ cfg( not( test) ) ]
180
- impl <$( $T: Eq ) ,+> Eq for ( $( $T) , +) {
180
+ impl <$( $T: Eq ) ,+> Eq for ( $( $T, ) +) {
181
181
#[ inline]
182
- fn eq( & self , other: & ( $( $T) , +) ) -> bool {
182
+ fn eq( & self , other: & ( $( $T, ) +) ) -> bool {
183
183
$( * self . $get_ref_fn( ) == * other. $get_ref_fn( ) ) &&+
184
184
}
185
185
#[ inline]
186
- fn ne( & self , other: & ( $( $T) , +) ) -> bool {
186
+ fn ne( & self , other: & ( $( $T, ) +) ) -> bool {
187
187
!( * self == * other)
188
188
}
189
189
}
190
190
191
191
#[ cfg( not( test) ) ]
192
- impl <$( $T: TotalEq ) ,+> TotalEq for ( $( $T) , +) {
192
+ impl <$( $T: TotalEq ) ,+> TotalEq for ( $( $T, ) +) {
193
193
#[ inline]
194
- fn equals( & self , other: & ( $( $T) , +) ) -> bool {
194
+ fn equals( & self , other: & ( $( $T, ) +) ) -> bool {
195
195
$( self . $get_ref_fn( ) . equals( other. $get_ref_fn( ) ) ) &&+
196
196
}
197
197
}
198
198
199
199
#[ cfg( not( test) ) ]
200
- impl <$( $T: Ord ) ,+> Ord for ( $( $T) , +) {
200
+ impl <$( $T: Ord ) ,+> Ord for ( $( $T, ) +) {
201
201
#[ inline]
202
- fn lt( & self , other: & ( $( $T) , +) ) -> bool {
202
+ fn lt( & self , other: & ( $( $T, ) +) ) -> bool {
203
203
lexical_lt!( $( self . $get_ref_fn( ) , other. $get_ref_fn( ) ) ,+)
204
204
}
205
205
#[ inline]
206
- fn le( & self , other: & ( $( $T) , +) ) -> bool { !( * other) . lt( & ( * self ) ) }
206
+ fn le( & self , other: & ( $( $T, ) +) ) -> bool { !( * other) . lt( & ( * self ) ) }
207
207
#[ inline]
208
- fn ge( & self , other: & ( $( $T) , +) ) -> bool { !( * self ) . lt( other) }
208
+ fn ge( & self , other: & ( $( $T, ) +) ) -> bool { !( * self ) . lt( other) }
209
209
#[ inline]
210
- fn gt( & self , other: & ( $( $T) , +) ) -> bool { ( * other) . lt( & ( * self ) ) }
210
+ fn gt( & self , other: & ( $( $T, ) +) ) -> bool { ( * other) . lt( & ( * self ) ) }
211
211
}
212
212
213
213
#[ cfg( not( test) ) ]
214
- impl <$( $T: TotalOrd ) ,+> TotalOrd for ( $( $T) , +) {
214
+ impl <$( $T: TotalOrd ) ,+> TotalOrd for ( $( $T, ) +) {
215
215
#[ inline]
216
- fn cmp( & self , other: & ( $( $T) , +) ) -> Ordering {
216
+ fn cmp( & self , other: & ( $( $T, ) +) ) -> Ordering {
217
217
lexical_cmp!( $( self . $get_ref_fn( ) , other. $get_ref_fn( ) ) ,+)
218
218
}
219
219
}
220
220
221
221
#[ cfg( not( test) ) ]
222
- impl <$( $T: Zero ) ,+> Zero for ( $( $T) , +) {
222
+ impl <$( $T: Zero ) ,+> Zero for ( $( $T, ) +) {
223
223
#[ inline]
224
- fn zero( ) -> ( $( $T) , +) {
225
- ( $( Zero :: zero:: <$T>( ) ) , +)
224
+ fn zero( ) -> ( $( $T, ) +) {
225
+ ( $( Zero :: zero:: <$T>( ) , ) +)
226
226
}
227
227
#[ inline]
228
228
fn is_zero( & self ) -> bool {
@@ -259,6 +259,10 @@ macro_rules! lexical_cmp {
259
259
260
260
261
261
tuple_impls ! {
262
+ ( CloneableTuple1 , ImmutableTuple1 ) {
263
+ ( n0, n0_ref) -> A { ( ref a, ) => a }
264
+ }
265
+
262
266
( CloneableTuple2 , ImmutableTuple2 ) {
263
267
( n0, n0_ref) -> A { ( ref a, _) => a }
264
268
( n1, n1_ref) -> B { ( _, ref b) => b }
0 commit comments