summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/option-to-bool.rs
blob: 2a1823b15f589d61e913ac8394eff1487691bf24 (plain)
1
2
3
4
5
6
7
8
9
#![cfg_attr(let_chains, feature(let_chains))]

fn foo(x: Option<i32>) {
    if true && x {}
    //~^ ERROR mismatched types
    //~| HELP use `Option::is_some` to test if the `Option` has a value
}

fn main() {}