match checking add additional test for match checking tuple with missing pattern

This commit is contained in:
Josh Mcguigan 2020-04-07 15:39:50 -07:00
parent 941615748d
commit 36c110ee09

View File

@ -1334,6 +1334,20 @@ mod tests {
check_diagnostic(content);
}
#[test]
fn malformed_match_arm_tuple_missing_pattern() {
let content = r"
fn test_fn() {
match (0) {
() => (),
}
}
";
// Match arms with the incorrect type are filtered out.
check_diagnostic(content);
}
#[test]
fn malformed_match_arm_tuple_enum_missing_pattern() {
let content = r"