2011-09-12 04:27:30 -05:00
|
|
|
fn get_third<@T>(t: (T, T, T)) -> T { let (_, _, x) = t; ret x; }
|
2011-08-15 06:39:45 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
log get_third((1, 2, 3));
|
|
|
|
assert (get_third((1, 2, 3)) == 3);
|
|
|
|
assert (get_third((5u8, 6u8, 7u8)) == 7u8);
|
2011-08-12 08:37:25 -05:00
|
|
|
}
|