diff options
Diffstat (limited to 'tests/ui/issues/issue-19991.rs')
-rw-r--r-- | tests/ui/issues/issue-19991.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-19991.rs b/tests/ui/issues/issue-19991.rs new file mode 100644 index 000000000..dd0efa972 --- /dev/null +++ b/tests/ui/issues/issue-19991.rs @@ -0,0 +1,9 @@ +// Test if the sugared `if let` construct correctly prints "missing an else clause" when an else +// clause does not exist, instead of the unsympathetic "`match` arms have incompatible types" + +fn main() { + if let Some(homura) = Some("madoka") { //~ ERROR missing an `else` clause + //~| expected integer, found `()` + 765 + }; +} |