match checking add additional test for match checking tuple with missing pattern
This commit is contained in:
parent
941615748d
commit
36c110ee09
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user