@@ -93,7 +93,6 @@ impl<'self,A:Copy,B:Copy> ExtendedTupleOps<A,B> for (&'self [A], &'self [B]) {
93
93
}
94
94
95
95
impl < A : Copy , B : Copy > ExtendedTupleOps < A , B > for ( ~[ A ] , ~[ B ] ) {
96
-
97
96
#[ inline( always) ]
98
97
fn zip ( & self ) -> ~[ ( A , B ) ] {
99
98
match * self {
@@ -117,41 +116,54 @@ impl<A:Copy,B:Copy> ExtendedTupleOps<A,B> for (~[A], ~[B]) {
117
116
118
117
macro_rules! tuple_impls(
119
118
( $(
120
- $name: ident {
121
- $( fn $get_fn: ident -> $T: ident { $get_pattern: pat => $ret: expr } ) +
119
+ ( $cloneable_trait: ident, $immutable_trait: ident) {
120
+ $( ( $get_fn: ident, $get_ref_fn: ident) -> $T: ident {
121
+ $get_pattern: pat => $ret: expr
122
+ } ) +
122
123
}
123
124
) +) => (
124
125
pub mod inner {
125
126
use clone:: Clone ;
126
127
#[ cfg( not( test) ) ] use cmp:: { Eq , Ord } ;
127
128
128
129
$(
129
- pub trait $name<$( $T) ,+> {
130
- $( fn $get_fn<' a>( & ' a self ) -> & ' a $T; ) +
130
+ pub trait $cloneable_trait<$( $T) ,+> {
131
+ $( fn $get_fn( & self ) -> $T; ) +
132
+ }
133
+
134
+ impl <$( $T: Clone ) ,+> $cloneable_trait<$( $T) ,+> for ( $( $T) ,+) {
135
+ $(
136
+ #[ inline( always) ]
137
+ fn $get_fn( & self ) -> $T {
138
+ self . $get_ref_fn( ) . clone( )
139
+ }
140
+ ) +
141
+ }
142
+
143
+ pub trait $immutable_trait<$( $T) ,+> {
144
+ $( fn $get_ref_fn<' a>( & ' a self ) -> & ' a $T; ) +
131
145
}
132
146
133
- impl <$( $T) ,+> $name <$( $T) ,+> for ( $( $T) ,+) {
147
+ impl <$( $T) ,+> $immutable_trait <$( $T) ,+> for ( $( $T) ,+) {
134
148
$(
135
149
#[ inline( always) ]
136
- fn $get_fn<' a>( & ' a self ) -> & ' a $T {
137
- match * self {
138
- $get_pattern => $ret
139
- }
150
+ fn $get_ref_fn<' a>( & ' a self ) -> & ' a $T {
151
+ match * self { $get_pattern => $ret }
140
152
}
141
153
) +
142
154
}
143
155
144
156
impl <$( $T: Clone ) ,+> Clone for ( $( $T) ,+) {
145
157
fn clone( & self ) -> ( $( $T) ,+) {
146
- ( $( self . $get_fn ( ) . clone( ) ) ,+)
158
+ ( $( self . $get_ref_fn ( ) . clone( ) ) ,+)
147
159
}
148
160
}
149
161
150
162
#[ cfg( not( test) ) ]
151
163
impl <$( $T: Eq ) ,+> Eq for ( $( $T) ,+) {
152
164
#[ inline( always) ]
153
165
fn eq( & self , other: & ( $( $T) ,+) ) -> bool {
154
- $( * self . $get_fn ( ) == * other. $get_fn ( ) ) &&+
166
+ $( * self . $get_ref_fn ( ) == * other. $get_ref_fn ( ) ) &&+
155
167
}
156
168
157
169
#[ inline( always) ]
@@ -164,22 +176,22 @@ macro_rules! tuple_impls(
164
176
impl <$( $T: Ord ) ,+> Ord for ( $( $T) ,+) {
165
177
#[ inline( always) ]
166
178
fn lt( & self , other: & ( $( $T) ,+) ) -> bool {
167
- $( * self . $get_fn ( ) < * other. $get_fn ( ) ) &&+
179
+ $( * self . $get_ref_fn ( ) < * other. $get_ref_fn ( ) ) &&+
168
180
}
169
181
170
182
#[ inline( always) ]
171
183
fn le( & self , other: & ( $( $T) ,+) ) -> bool {
172
- $( * self . $get_fn ( ) <= * other. $get_fn ( ) ) &&+
184
+ $( * self . $get_ref_fn ( ) <= * other. $get_ref_fn ( ) ) &&+
173
185
}
174
186
175
187
#[ inline( always) ]
176
188
fn ge( & self , other: & ( $( $T) ,+) ) -> bool {
177
- $( * self . $get_fn ( ) >= * other. $get_fn ( ) ) &&+
189
+ $( * self . $get_ref_fn ( ) >= * other. $get_ref_fn ( ) ) &&+
178
190
}
179
191
180
192
#[ inline( always) ]
181
193
fn gt( & self , other: & ( $( $T) ,+) ) -> bool {
182
- $( * self . $get_fn ( ) > * other. $get_fn ( ) ) &&+
194
+ $( * self . $get_ref_fn ( ) > * other. $get_ref_fn ( ) ) &&+
183
195
}
184
196
}
185
197
) +
@@ -188,114 +200,114 @@ macro_rules! tuple_impls(
188
200
)
189
201
190
202
tuple_impls ! (
191
- Tuple2 {
192
- fn n0 -> A { ( ref a, _) => a }
193
- fn n1 -> B { ( _, ref b) => b }
203
+ ( CloneableTuple2 , ImmutableTuple2 ) {
204
+ ( n0 , n0_ref ) -> A { ( ref a, _) => a }
205
+ ( n1 , n1_ref ) -> B { ( _, ref b) => b }
194
206
}
195
207
196
- Tuple3 {
197
- fn n0 -> A { ( ref a, _, _) => a }
198
- fn n1 -> B { ( _, ref b, _) => b }
199
- fn n2 -> C { ( _, _, ref c) => c }
208
+ ( CloneableTuple3 , ImmutableTuple3 ) {
209
+ ( n0 , n0_ref ) -> A { ( ref a, _, _) => a }
210
+ ( n1 , n1_ref ) -> B { ( _, ref b, _) => b }
211
+ ( n2 , n2_ref ) -> C { ( _, _, ref c) => c }
200
212
}
201
213
202
- Tuple4 {
203
- fn n0 -> A { ( ref a, _, _, _) => a }
204
- fn n1 -> B { ( _, ref b, _, _) => b }
205
- fn n2 -> C { ( _, _, ref c, _) => c }
206
- fn n3 -> D { ( _, _, _, ref d) => d }
214
+ ( CloneableTuple4 , ImmutableTuple4 ) {
215
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _) => a }
216
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _) => b }
217
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _) => c }
218
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d) => d }
207
219
}
208
220
209
- Tuple5 {
210
- fn n0 -> A { ( ref a, _, _, _, _) => a }
211
- fn n1 -> B { ( _, ref b, _, _, _) => b }
212
- fn n2 -> C { ( _, _, ref c, _, _) => c }
213
- fn n3 -> D { ( _, _, _, ref d, _) => d }
214
- fn n4 -> E { ( _, _, _, _, ref e) => e }
221
+ ( CloneableTuple5 , ImmutableTuple5 ) {
222
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _) => a }
223
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _) => b }
224
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _) => c }
225
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _) => d }
226
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e) => e }
215
227
}
216
228
217
- Tuple6 {
218
- fn n0 -> A { ( ref a, _, _, _, _, _) => a }
219
- fn n1 -> B { ( _, ref b, _, _, _, _) => b }
220
- fn n2 -> C { ( _, _, ref c, _, _, _) => c }
221
- fn n3 -> D { ( _, _, _, ref d, _, _) => d }
222
- fn n4 -> E { ( _, _, _, _, ref e, _) => e }
223
- fn n5 -> F { ( _, _, _, _, _, ref f) => f }
229
+ ( CloneableTuple6 , ImmutableTuple6 ) {
230
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _) => a }
231
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _) => b }
232
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _) => c }
233
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _) => d }
234
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _) => e }
235
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f) => f }
224
236
}
225
237
226
- Tuple7 {
227
- fn n0 -> A { ( ref a, _, _, _, _, _, _) => a }
228
- fn n1 -> B { ( _, ref b, _, _, _, _, _) => b }
229
- fn n2 -> C { ( _, _, ref c, _, _, _, _) => c }
230
- fn n3 -> D { ( _, _, _, ref d, _, _, _) => d }
231
- fn n4 -> E { ( _, _, _, _, ref e, _, _) => e }
232
- fn n5 -> F { ( _, _, _, _, _, ref f, _) => f }
233
- fn n6 -> G { ( _, _, _, _, _, _, ref g) => g }
238
+ ( CloneableTuple7 , ImmutableTuple7 ) {
239
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _) => a }
240
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _) => b }
241
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _) => c }
242
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _) => d }
243
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _) => e }
244
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _) => f }
245
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g) => g }
234
246
}
235
247
236
- Tuple8 {
237
- fn n0 -> A { ( ref a, _, _, _, _, _, _, _) => a }
238
- fn n1 -> B { ( _, ref b, _, _, _, _, _, _) => b }
239
- fn n2 -> C { ( _, _, ref c, _, _, _, _, _) => c }
240
- fn n3 -> D { ( _, _, _, ref d, _, _, _, _) => d }
241
- fn n4 -> E { ( _, _, _, _, ref e, _, _, _) => e }
242
- fn n5 -> F { ( _, _, _, _, _, ref f, _, _) => f }
243
- fn n6 -> G { ( _, _, _, _, _, _, ref g, _) => g }
244
- fn n7 -> H { ( _, _, _, _, _, _, _, ref h) => h }
248
+ ( CloneableTuple8 , ImmutableTuple8 ) {
249
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _, _) => a }
250
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _, _) => b }
251
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _, _) => c }
252
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _, _) => d }
253
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _, _) => e }
254
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _, _) => f }
255
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g, _) => g }
256
+ ( n7 , n7_ref ) -> H { ( _, _, _, _, _, _, _, ref h) => h }
245
257
}
246
258
247
- Tuple9 {
248
- fn n0 -> A { ( ref a, _, _, _, _, _, _, _, _) => a }
249
- fn n1 -> B { ( _, ref b, _, _, _, _, _, _, _) => b }
250
- fn n2 -> C { ( _, _, ref c, _, _, _, _, _, _) => c }
251
- fn n3 -> D { ( _, _, _, ref d, _, _, _, _, _) => d }
252
- fn n4 -> E { ( _, _, _, _, ref e, _, _, _, _) => e }
253
- fn n5 -> F { ( _, _, _, _, _, ref f, _, _, _) => f }
254
- fn n6 -> G { ( _, _, _, _, _, _, ref g, _, _) => g }
255
- fn n7 -> H { ( _, _, _, _, _, _, _, ref h, _) => h }
256
- fn n8 -> I { ( _, _, _, _, _, _, _, _, ref i) => i }
259
+ ( CloneableTuple9 , ImmutableTuple9 ) {
260
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _, _, _) => a }
261
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _, _, _) => b }
262
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _, _, _) => c }
263
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _, _, _) => d }
264
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _, _, _) => e }
265
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _, _, _) => f }
266
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g, _, _) => g }
267
+ ( n7 , n7_ref ) -> H { ( _, _, _, _, _, _, _, ref h, _) => h }
268
+ ( n8 , n8_ref ) -> I { ( _, _, _, _, _, _, _, _, ref i) => i }
257
269
}
258
270
259
- Tuple10 {
260
- fn n0 -> A { ( ref a, _, _, _, _, _, _, _, _, _) => a }
261
- fn n1 -> B { ( _, ref b, _, _, _, _, _, _, _, _) => b }
262
- fn n2 -> C { ( _, _, ref c, _, _, _, _, _, _, _) => c }
263
- fn n3 -> D { ( _, _, _, ref d, _, _, _, _, _, _) => d }
264
- fn n4 -> E { ( _, _, _, _, ref e, _, _, _, _, _) => e }
265
- fn n5 -> F { ( _, _, _, _, _, ref f, _, _, _, _) => f }
266
- fn n6 -> G { ( _, _, _, _, _, _, ref g, _, _, _) => g }
267
- fn n7 -> H { ( _, _, _, _, _, _, _, ref h, _, _) => h }
268
- fn n8 -> I { ( _, _, _, _, _, _, _, _, ref i, _) => i }
269
- fn n9 -> J { ( _, _, _, _, _, _, _, _, _, ref j) => j }
271
+ ( CloneableTuple10 , ImmutableTuple10 ) {
272
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _, _, _, _) => a }
273
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _, _, _, _) => b }
274
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _, _, _, _) => c }
275
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _, _, _, _) => d }
276
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _, _, _, _) => e }
277
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _, _, _, _) => f }
278
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g, _, _, _) => g }
279
+ ( n7 , n7_ref ) -> H { ( _, _, _, _, _, _, _, ref h, _, _) => h }
280
+ ( n8 , n8_ref ) -> I { ( _, _, _, _, _, _, _, _, ref i, _) => i }
281
+ ( n9 , n9_ref ) -> J { ( _, _, _, _, _, _, _, _, _, ref j) => j }
270
282
}
271
283
272
- Tuple11 {
273
- fn n0 -> A { ( ref a, _, _, _, _, _, _, _, _, _, _) => a }
274
- fn n1 -> B { ( _, ref b, _, _, _, _, _, _, _, _, _) => b }
275
- fn n2 -> C { ( _, _, ref c, _, _, _, _, _, _, _, _) => c }
276
- fn n3 -> D { ( _, _, _, ref d, _, _, _, _, _, _, _) => d }
277
- fn n4 -> E { ( _, _, _, _, ref e, _, _, _, _, _, _) => e }
278
- fn n5 -> F { ( _, _, _, _, _, ref f, _, _, _, _, _) => f }
279
- fn n6 -> G { ( _, _, _, _, _, _, ref g, _, _, _, _) => g }
280
- fn n7 -> H { ( _, _, _, _, _, _, _, ref h, _, _, _) => h }
281
- fn n8 -> I { ( _, _, _, _, _, _, _, _, ref i, _, _) => i }
282
- fn n9 -> J { ( _, _, _, _, _, _, _, _, _, ref j, _) => j }
283
- fn n10 -> K { ( _, _, _, _, _, _, _, _, _, _, ref k) => k }
284
+ ( CloneableTuple11 , ImmutableTuple11 ) {
285
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _, _, _, _, _) => a }
286
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _, _, _, _, _) => b }
287
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _, _, _, _, _) => c }
288
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _, _, _, _, _) => d }
289
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _, _, _, _, _) => e }
290
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _, _, _, _, _) => f }
291
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g, _, _, _, _) => g }
292
+ ( n7 , n7_ref ) -> H { ( _, _, _, _, _, _, _, ref h, _, _, _) => h }
293
+ ( n8 , n8_ref ) -> I { ( _, _, _, _, _, _, _, _, ref i, _, _) => i }
294
+ ( n9 , n9_ref ) -> J { ( _, _, _, _, _, _, _, _, _, ref j, _) => j }
295
+ ( n10, n10_ref ) -> K { ( _, _, _, _, _, _, _, _, _, _, ref k) => k }
284
296
}
285
297
286
- Tuple12 {
287
- fn n0 -> A { ( ref a, _, _, _, _, _, _, _, _, _, _, _) => a }
288
- fn n1 -> B { ( _, ref b, _, _, _, _, _, _, _, _, _, _) => b }
289
- fn n2 -> C { ( _, _, ref c, _, _, _, _, _, _, _, _, _) => c }
290
- fn n3 -> D { ( _, _, _, ref d, _, _, _, _, _, _, _, _) => d }
291
- fn n4 -> E { ( _, _, _, _, ref e, _, _, _, _, _, _, _) => e }
292
- fn n5 -> F { ( _, _, _, _, _, ref f, _, _, _, _, _, _) => f }
293
- fn n6 -> G { ( _, _, _, _, _, _, ref g, _, _, _, _, _) => g }
294
- fn n7 -> H { ( _, _, _, _, _, _, _, ref h, _, _, _, _) => h }
295
- fn n8 -> I { ( _, _, _, _, _, _, _, _, ref i, _, _, _) => i }
296
- fn n9 -> J { ( _, _, _, _, _, _, _, _, _, ref j, _, _) => j }
297
- fn n10 -> K { ( _, _, _, _, _, _, _, _, _, _, ref k, _) => k }
298
- fn n11 -> L { ( _, _, _, _, _, _, _, _, _, _, _, ref l) => l }
298
+ ( CloneableTuple12 , ImmutableTuple12 ) {
299
+ ( n0 , n0_ref ) -> A { ( ref a, _, _, _, _, _, _, _, _, _, _, _) => a }
300
+ ( n1 , n1_ref ) -> B { ( _, ref b, _, _, _, _, _, _, _, _, _, _) => b }
301
+ ( n2 , n2_ref ) -> C { ( _, _, ref c, _, _, _, _, _, _, _, _, _) => c }
302
+ ( n3 , n3_ref ) -> D { ( _, _, _, ref d, _, _, _, _, _, _, _, _) => d }
303
+ ( n4 , n4_ref ) -> E { ( _, _, _, _, ref e, _, _, _, _, _, _, _) => e }
304
+ ( n5 , n5_ref ) -> F { ( _, _, _, _, _, ref f, _, _, _, _, _, _) => f }
305
+ ( n6 , n6_ref ) -> G { ( _, _, _, _, _, _, ref g, _, _, _, _, _) => g }
306
+ ( n7 , n7_ref ) -> H { ( _, _, _, _, _, _, _, ref h, _, _, _, _) => h }
307
+ ( n8 , n8_ref ) -> I { ( _, _, _, _, _, _, _, _, ref i, _, _, _) => i }
308
+ ( n9 , n9_ref ) -> J { ( _, _, _, _, _, _, _, _, _, ref j, _, _) => j }
309
+ ( n10, n10_ref ) -> K { ( _, _, _, _, _, _, _, _, _, _, ref k, _) => k }
310
+ ( n11, n11_ref ) -> L { ( _, _, _, _, _, _, _, _, _, _, _, ref l) => l }
299
311
}
300
312
)
301
313
@@ -325,16 +337,29 @@ fn test_clone() {
325
337
#[ test]
326
338
fn test_n_tuple ( ) {
327
339
let t = ( 0u8 , 1u16 , 2u32 , 3u64 , 4 u, 5i8 , 6i16 , 7i32 , 8i64 , 9 i, 10f32 , 11f64 ) ;
328
- assert_eq ! ( * t. n0( ) , 0u8 ) ;
329
- assert_eq ! ( * t. n1( ) , 1u16 ) ;
330
- assert_eq ! ( * t. n2( ) , 2u32 ) ;
331
- assert_eq ! ( * t. n3( ) , 3u64 ) ;
332
- assert_eq ! ( * t. n4( ) , 4 u) ;
333
- assert_eq ! ( * t. n5( ) , 5i8 ) ;
334
- assert_eq ! ( * t. n6( ) , 6i16 ) ;
335
- assert_eq ! ( * t. n7( ) , 7i32 ) ;
336
- assert_eq ! ( * t. n8( ) , 8i64 ) ;
337
- assert_eq ! ( * t. n9( ) , 9 i) ;
338
- assert_eq ! ( * t. n10( ) , 10f32 ) ;
339
- assert_eq ! ( * t. n11( ) , 11f64 ) ;
340
+ assert_eq ! ( t. n0( ) , 0u8 ) ;
341
+ assert_eq ! ( t. n1( ) , 1u16 ) ;
342
+ assert_eq ! ( t. n2( ) , 2u32 ) ;
343
+ assert_eq ! ( t. n3( ) , 3u64 ) ;
344
+ assert_eq ! ( t. n4( ) , 4 u) ;
345
+ assert_eq ! ( t. n5( ) , 5i8 ) ;
346
+ assert_eq ! ( t. n6( ) , 6i16 ) ;
347
+ assert_eq ! ( t. n7( ) , 7i32 ) ;
348
+ assert_eq ! ( t. n8( ) , 8i64 ) ;
349
+ assert_eq ! ( t. n9( ) , 9 i) ;
350
+ assert_eq ! ( t. n10( ) , 10f32 ) ;
351
+ assert_eq ! ( t. n11( ) , 11f64 ) ;
352
+
353
+ assert_eq ! ( t. n0_ref( ) , & 0u8 ) ;
354
+ assert_eq ! ( t. n1_ref( ) , & 1u16 ) ;
355
+ assert_eq ! ( t. n2_ref( ) , & 2u32 ) ;
356
+ assert_eq ! ( t. n3_ref( ) , & 3u64 ) ;
357
+ assert_eq ! ( t. n4_ref( ) , & 4 u) ;
358
+ assert_eq ! ( t. n5_ref( ) , & 5i8 ) ;
359
+ assert_eq ! ( t. n6_ref( ) , & 6i16 ) ;
360
+ assert_eq ! ( t. n7_ref( ) , & 7i32 ) ;
361
+ assert_eq ! ( t. n8_ref( ) , & 8i64 ) ;
362
+ assert_eq ! ( t. n9_ref( ) , & 9 i) ;
363
+ assert_eq ! ( t. n10_ref( ) , & 10f32 ) ;
364
+ assert_eq ! ( t. n11_ref( ) , & 11f64 ) ;
340
365
}
0 commit comments