]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | // run-pass |
1a4d82fc | 2 | fn get_third<T>(t: (T, T, T)) -> T { let (_, _, x) = t; return x; } |
223e47cc LB |
3 | |
4 | pub fn main() { | |
85aaf69f SL |
5 | println!("{}", get_third((1, 2, 3))); |
6 | assert_eq!(get_third((1, 2, 3)), 3); | |
970d7e83 | 7 | assert_eq!(get_third((5u8, 6u8, 7u8)), 7u8); |
223e47cc | 8 | } |