about summary refs log tree commit diff
path: root/tests/ui/match/match-struct.rs
blob: 2160571302f91f62da152c23f856601b584d0fba (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 }) { //~ NOTE this expression has type `S`
        E::C(_) => (),
        //~^ ERROR mismatched types
        //~| NOTE expected `S`, found `E`
        _ => ()
    }
}