summaryrefslogtreecommitdiffstats
path: root/tests/ui/expr/if/if-without-else-result.rs
blob: 95604758a6b3e57f4bfbfa87bfe0642103d0928a (plain)
1
2
3
4
5
6
fn main() {
    let a = if true { true };
    //~^ ERROR `if` may be missing an `else` clause [E0317]
    //~| expected `bool`, found `()`
    println!("{}", a);
}