rust/src/test/compile-fail/match-struct.rs
Jeong YunWon 35baf5b202 Fix reversed current/expected type
Fix some reversed type of arm pattern and type of search pattern
in error message.
2013-02-28 03:31:22 +09:00

11 lines
174 B
Rust

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