match checking add additional test for match checking tuple with missing pattern
This commit is contained in:
@@ -1334,6 +1334,20 @@ mod tests {
|
|||||||
check_diagnostic(content);
|
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]
|
#[test]
|
||||||
fn malformed_match_arm_tuple_enum_missing_pattern() {
|
fn malformed_match_arm_tuple_enum_missing_pattern() {
|
||||||
let content = r"
|
let content = r"
|
||||||
|
|||||||
Reference in New Issue
Block a user