rust/src/test/run-pass/generic-tup.rs
Marijn Haverbeke fc6b7c8b38 Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00

8 lines
199 B
Rust

fn get_third<@T>(t: (T, T, T)) -> T { let (_, _, x) = t; ret x; }
fn main() {
log get_third((1, 2, 3));
assert (get_third((1, 2, 3)) == 3);
assert (get_third((5u8, 6u8, 7u8)) == 7u8);
}