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