2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
|
2012-01-05 08:35:37 -06:00
|
|
|
fn id<T: copy>(t: T) -> T { ret t; }
|
2010-10-10 02:14:26 -05:00
|
|
|
|
|
|
|
fn main() {
|
2011-07-27 07:19:39 -05:00
|
|
|
let t = {_0: 1, _1: 2, _2: 3, _3: 4, _4: 5, _5: 6, _6: 7};
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (t._5 == 6);
|
2011-07-27 07:19:39 -05:00
|
|
|
let f1 =
|
2012-02-07 08:37:08 -06:00
|
|
|
id::<{_0: int,
|
|
|
|
_1: int,
|
|
|
|
_2: int,
|
|
|
|
_3: int,
|
|
|
|
_4: int,
|
|
|
|
_5: int,
|
|
|
|
_6: int}>(_);
|
2011-06-15 13:19:50 -05:00
|
|
|
assert (f1(t)._5 == 6);
|
2011-08-12 08:37:25 -05:00
|
|
|
}
|