rust/src/test/run-pass/generic-tup.rs
Marijn Haverbeke 60ae1590af Switch to new param kind bound syntax
And remove support for the old syntax
2012-01-05 15:50:02 +01:00

8 lines
212 B
Rust

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