summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/expr-as-stmt-2.rs
blob: 3a18bdc3b730a8477a27a00e361d769ef4f8033a (plain)
1
2
3
4
5
6
7
8
9
10
// This is not autofixable because we give extra suggestions to end the first expression with `;`.
fn foo(a: Option<u32>, b: Option<u32>) -> bool {
    if let Some(x) = a { true } else { false }
    //~^ ERROR mismatched types
    //~| ERROR mismatched types
    && //~ ERROR mismatched types
    if let Some(y) = a { true } else { false }
}

fn main() {}