]> git.lizzy.rs Git - rust.git/blob - src/test/ui/if/if-without-else-result.rs
Auto merge of #65838 - estebank:resilient-recovery, r=Centril
[rust.git] / src / test / ui / if / if-without-else-result.rs
1 fn main() {
2     let a = if true { true };
3     //~^ ERROR if may be missing an else clause [E0317]
4     //~| expected type `()`
5     //~| found type `bool`
6     //~| expected (), found bool
7     println!("{}", a);
8 }