]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generics/generic-tup.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / generics / generic-tup.rs
CommitLineData
b7449926 1// run-pass
1a4d82fc 2fn get_third<T>(t: (T, T, T)) -> T { let (_, _, x) = t; return x; }
223e47cc
LB
3
4pub 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}