rust/src/test/ui/match/match-struct.rs
2018-12-25 21:08:33 -07:00

14 lines
271 B
Rust

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