1 error[E0308]: mismatched types
2 --> $DIR/issue-5358-1.rs:6:9
4 LL | match S(Either::Left(5)) {
5 | ------------------ this expression has type `S`
6 LL | Either::Right(_) => {}
7 | ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either`
9 = note: expected struct `S`
10 found enum `Either<_, _>`
11 help: try wrapping the pattern in `S`
13 LL | S(Either::Right(_)) => {}
15 help: you might have meant to use field `0` whose type is `Either<usize, usize>`
17 LL | match S(Either::Left(5)).0 {
18 | ~~~~~~~~~~~~~~~~~~~~
20 error: aborting due to previous error
22 For more information about this error, try `rustc --explain E0308`.