2011-11-18 05:39:20 -06:00
|
|
|
fn get_third<copy 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
|
|
|
}
|