]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-19991.rs
Rollup merge of #66134 - estebank:unknown-formatting-trait, r=nikomatsakis
[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 type `()`
7                                            //~| found type `{integer}`
8                                            //~| expected (), found integer
9         765
10     };
11 }