]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-19991.rs
Merge commit 'cd4810de42c57b64b74dae09c530a4c3a41f87b9' into libgccjit-codegen
[rust.git] / src / test / ui / issues / issue-19991.rs
1 // Test if the sugared `if let` construct correctly prints "missing an else clause" when an else
2 // clause does not exist, instead of the unsympathetic "`match` arms have incompatible types"
3
4 fn main() {
5     if let Some(homura) = Some("madoka") { //~  ERROR missing an `else` clause
6                                            //~| expected `()`, found integer
7         765
8     };
9 }