1 // run-pass 2 3 #![allow(non_camel_case_types)] 4 5 type point = (isize, isize); 6 f(p: point, x: isize, y: isize)7fn f(p: point, x: isize, y: isize) { 8 let (a, b) = p; 9 assert_eq!(a, x); 10 assert_eq!(b, y); 11 } 12 main()13pub fn main() { 14 let p: point = (10, 20); 15 let (a, b) = p; 16 assert_eq!(a, 10); 17 assert_eq!(b, 20); 18 let p2: point = p; 19 f(p, 10, 20); 20 f(p2, 10, 20); 21 } 22