Skip to content

Commit 36c110e

Browse files
committed
match checking add additional test for match checking tuple with missing pattern
1 parent 9416157 commit 36c110e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

crates/ra_hir_ty/src/_match.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,6 +1334,20 @@ mod tests {
13341334
check_diagnostic(content);
13351335
}
13361336

1337+
#[test]
1338+
fn malformed_match_arm_tuple_missing_pattern() {
1339+
let content = r"
1340+
fn test_fn() {
1341+
match (0) {
1342+
() => (),
1343+
}
1344+
}
1345+
";
1346+
1347+
// Match arms with the incorrect type are filtered out.
1348+
check_diagnostic(content);
1349+
}
1350+
13371351
#[test]
13381352
fn malformed_match_arm_tuple_enum_missing_pattern() {
13391353
let content = r"

0 commit comments

Comments
 (0)