Add middle ellipsis missing arm text

This commit is contained in:
Lukas Wirth 2020-11-24 16:46:06 +01:00
parent a4b5275656
commit 4d841dc4e7

View file

@ -1379,6 +1379,20 @@ fn main() {
}"#,
);
}
#[test]
fn tuple_of_bools_with_ellipsis_in_middle_missing_arm() {
check_diagnostics(
r#"
fn main() {
match (false, true, false) {
//^^^^^^^^^^^^^^^^^^^^ Missing match arm
(true, .., false) => (),
}
}"#,
);
}
mod false_negatives {
//! The implementation of match checking here is a work in progress. As we roll this out, we
//! prefer false negatives to false positives (ideally there would be no false positives). This