summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5358-1.rs
blob: f5e32e78d8794f38ec9bfffc289f6de8388b0f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
enum Either<T, U> { Left(T), Right(U) }
struct S(Either<usize, usize>);

fn main() {
    match S(Either::Left(5)) {
        Either::Right(_) => {}
        //~^ ERROR mismatched types
        //~| expected struct `S`, found enum `Either`
        //~| expected struct `S`
        //~| found enum `Either<_, _>`
        _ => {}
    }
}