auto merge of #5070 : youknowone/rust/struct-match2, r=nikomatsakis

It is reversed that type of arm pattern and type of search pattern
in error message.
This commit is contained in:
bors 2013-02-27 12:21:49 -08:00
commit 5fc0eccdfa
5 changed files with 19 additions and 14 deletions

View file

@ -10,6 +10,6 @@
fn main() {
match None {
Err(_) => () //~ ERROR expected `core::result
Err(_) => () //~ ERROR mismatched types: expected `core::option::Option<<V1>>` but found `core::result::Result<<V2>,<V3>>`
}
}

View file

@ -1,11 +1,10 @@
// error-pattern: mismatched types
struct S { a: int }
enum E { C(int) }
fn main() {
match S { a: 1 } {
C(_) => (),
C(_) => (), //~ ERROR mismatched types: expected `S` but found `E`
_ => ()
}
}