60ae1590af
And remove support for the old syntax
8 lines
212 B
Rust
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);
|
|
}
|