summary refs log tree commit diff
path: root/src/test/compile-fail/match-struct.rs
blob: 6e9bf603aef9e7e3759caa9a536d08511b198613 (plain)
1
2
3
4
5
6
7
8
9
10

struct S { a: int }
enum E { C(int) }

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