1 #![feature(box_patterns)]
2 #![feature(box_syntax)]
9 //~^ ERROR mismatched types
10 //~| expected type `(bool, bool)`
12 //~| expected tuple, found enum `A`
17 (true, false, false) => ()
18 //~^ ERROR mismatched types
19 //~| expected type `(bool, bool)`
20 //~| found type `(_, _, _)`
21 //~| expected a tuple with 2 elements, found one with 3 elements
25 (true, false, false) => ()
26 //~^ ERROR mismatched types
27 //~| expected type `(bool, bool)`
28 //~| found type `(_, _, _)`
29 //~| expected a tuple with 2 elements, found one with 3 elements
33 box (true, false) => ()
34 //~^ ERROR mismatched types
35 //~| expected type `(bool, bool)`
36 //~| found type `std::boxed::Box<_>`
41 //~^ ERROR mismatched types
42 //~| expected type `(bool, bool)`
44 //~| expected tuple, found reference
48 let v = [('a', 'b') //~ ERROR expected function, found `(char, char)`
52 for &(x,y) in &v {} // should be OK
54 // Make sure none of the errors above were fatal
55 let x: char = true; //~ ERROR mismatched types
56 //~| expected char, found bool