diff options
Diffstat (limited to 'tests/ui/match/match-struct.rs')
-rw-r--r-- | tests/ui/match/match-struct.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/match/match-struct.rs b/tests/ui/match/match-struct.rs new file mode 100644 index 000000000..7a54c54b9 --- /dev/null +++ b/tests/ui/match/match-struct.rs @@ -0,0 +1,11 @@ +struct S { a: isize } +enum E { C(isize) } + +fn main() { + match (S { a: 1 }) { + E::C(_) => (), + //~^ ERROR mismatched types + //~| expected struct `S`, found enum `E` + _ => () + } +} |