]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/expr-as-stmt-2.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[rust.git] / src / test / ui / parser / expr-as-stmt-2.rs
1 // This is not autofixable because we give extra suggestions to end the first expression with `;`.
2 fn foo(a: Option<u32>, b: Option<u32>) -> bool {
3     if let Some(x) = a { true } else { false }
4     //~^ ERROR mismatched types
5     //~| ERROR mismatched types
6     && //~ ERROR mismatched types
7     if let Some(y) = a { true } else { false }
8 }
9
10 fn main() {}