diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-5358-1.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-5358-1.rs b/src/test/ui/issues/issue-5358-1.rs new file mode 100644 index 000000000..f5e32e78d --- /dev/null +++ b/src/test/ui/issues/issue-5358-1.rs @@ -0,0 +1,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<_, _>` + _ => {} + } +} |