rust/tests/ui/suggestions/suggest-call-on-pat-mismatch.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
367 B
Rust
Raw Normal View History

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
}