diff options
Diffstat (limited to 'tests/ui/match/match-arm-resolving-to-never.rs')
-rw-r--r-- | tests/ui/match/match-arm-resolving-to-never.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/match/match-arm-resolving-to-never.rs b/tests/ui/match/match-arm-resolving-to-never.rs new file mode 100644 index 000000000..6ef249c05 --- /dev/null +++ b/tests/ui/match/match-arm-resolving-to-never.rs @@ -0,0 +1,19 @@ +enum E { + A, + B, + C, + D, + E, + F, +} + +fn main() { + match E::F { + E::A => 1, + E::B => 2, + E::C => 3, + E::D => 4, + E::E => unimplemented!(""), + E::F => "", //~ ERROR `match` arms have incompatible types + }; +} |