]> git.lizzy.rs Git - rust.git/blob - src/test/ui/if/if-without-else-result.rs
4602beb4c77dbdf74277c835371f90309d0e3ff4
[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 unit type `()`
5     //~| found type `bool`
6     //~| expected (), found bool
7     println!("{}", a);
8 }