about summary refs log tree commit diff
path: root/tests/ui/expr/if/if-without-else-result.rs
blob: 29aa3d3f6269d271ae5bbfd5878233ce840207a6 (plain)
1
2
3
4
5
6
7
8
//@ dont-require-annotations: NOTE

fn main() {
    let a = if true { true };
    //~^ ERROR `if` may be missing an `else` clause [E0317]
    //~| NOTE expected `bool`, found `()`
    println!("{}", a);
}