summary refs log tree commit diff
path: root/src/test/ui/match/match-struct.rs
blob: 5961e09a200a14f88cdaca5bbca62491b1030ab9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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`
        _ => ()
    }
}