about summary refs log tree commit diff
path: root/src/test/ui/if/if-without-else-result.rs
blob: cd7fde40fe8f38aa3a46986de849e8dcbee3d37f (plain)
1
2
3
4
5
6
7
8
fn main() {
    let a = if true { true };
    //~^ ERROR if may be missing an else clause [E0317]
    //~| expected type `()`
    //~| found type `bool`
    //~| expected (), found bool
    println!("{}", a);
}