Skip to content

Commit 4d841dc

Browse files
committed
Add middle ellipsis missing arm text
1 parent a4b5275 commit 4d841dc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

crates/hir_ty/src/diagnostics/match_check.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,20 @@ fn main() {
13791379
}"#,
13801380
);
13811381
}
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+
13821396
mod false_negatives {
13831397
//! The implementation of match checking here is a work in progress. As we roll this out, we
13841398
//! prefer false negatives to false positives (ideally there would be no false positives). This

0 commit comments

Comments
 (0)