summaryrefslogtreecommitdiffstats
path: root/tests/ui/match/match-struct.rs
blob: 7a54c54b98cb85c2762a4d1402797863db58159c (plain)
1
2
3
4
5
6
7
8
9
10
11
struct S { a: isize }
enum E { C(isize) }

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