diff options
-rw-r--r-- | crates/hir_ty/src/diagnostics/match_check.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/hir_ty/src/diagnostics/match_check.rs b/crates/hir_ty/src/diagnostics/match_check.rs index 78e207f86..a52f41764 100644 --- a/crates/hir_ty/src/diagnostics/match_check.rs +++ b/crates/hir_ty/src/diagnostics/match_check.rs | |||
@@ -1379,6 +1379,20 @@ fn main() { | |||
1379 | }"#, | 1379 | }"#, |
1380 | ); | 1380 | ); |
1381 | } | 1381 | } |
1382 | |||
1383 | #[test] | ||
1384 | fn tuple_of_bools_with_ellipsis_in_middle_missing_arm() { | ||
1385 | check_diagnostics( | ||
1386 | r#" | ||
1387 | fn main() { | ||
1388 | match (false, true, false) { | ||
1389 | //^^^^^^^^^^^^^^^^^^^^ Missing match arm | ||
1390 | (true, .., false) => (), | ||
1391 | } | ||
1392 | }"#, | ||
1393 | ); | ||
1394 | } | ||
1395 | |||
1382 | mod false_negatives { | 1396 | mod false_negatives { |
1383 | //! The implementation of match checking here is a work in progress. As we roll this out, we | 1397 | //! The implementation of match checking here is a work in progress. As we roll this out, we |
1384 | //! prefer false negatives to false positives (ideally there would be no false positives). This | 1398 | //! prefer false negatives to false positives (ideally there would be no false positives). This |