summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-5358-1.rs
blob: 14ee962b722e8cbe1b0381840416cdf895c315de (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 `S`, found `Either<_, _>`
        //~| expected struct `S`
        //~| found enum `Either<_, _>`
        _ => {}
    }
}