1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
16 //~^ ERROR mismatched types: expected `(bool,bool)`, found `A`
17 // (expected tuple, found enum A)
22 (true, false, false) => ()
23 //~^ ERROR mismatched types: expected `(bool,bool)`,
24 // found `(<generic #7>,<generic #8>,<generic #9>)`
25 // (expected a tuple with 2 elements, found one with 3 elements)
29 box (true, false) => ()
30 //~^ ERROR mismatched types: expected `(bool,bool)`, found `Box<<generic #11>>`
31 // (expected tuple, found box)
36 //~^ ERROR mismatched types: expected `(bool,bool)`, found `&<generic #15>`
37 // (expected tuple, found &-ptr)
41 let v = [('a', 'b') //~ ERROR expected function, found `(char,char)`
45 for &(x,y) in v.iter() {} // should be OK
47 // Make sure none of the errors above were fatal
48 let x: char = true; //~ ERROR expected `char`, found `bool`