3 #![feature(destructuring_assignment)]
8 assert_eq!((a, b), (0, 1));
10 assert_eq!((a, b), (1, 0));
12 assert_eq!((a, b), (1, 2));
14 assert_eq!((a, b), (2, 2));
16 assert_eq!((a, b), (2, 2));
22 // Test for a non-Copy type (String):
24 (c, d) = ("c".to_owned(), "d".to_owned());
31 // Test nesting/parentheses:
33 assert_eq!((a, b), (0, 1));
34 (((a, b)), (c)) = ((2, 3), d);
35 assert_eq!((a, b), (2, 3));
37 ((a, .., b), .., (..)) = ((4, 5), ());
38 assert_eq!((a, b), (4, 5));