rust/tests/ui/suggestions/suggest-call-on-pat-mismatch.rs
2023-02-10 18:18:08 +00:00

17 lines
367 B
Rust

enum E {
One(i32, i32),
}
fn main() {
let var = E::One;
if let E::One(var1, var2) = var {
//~^ ERROR mismatched types
//~| HELP use parentheses to construct this tuple variant
println!("{var1} {var2}");
}
let Some(x) = Some;
//~^ ERROR mismatched types
//~| HELP use parentheses to construct this tuple variant
}