diff options
-rw-r--r-- | crates/ra_hir_ty/src/_match.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/_match.rs b/crates/ra_hir_ty/src/_match.rs index 037db5cf8..9e9a9d047 100644 --- a/crates/ra_hir_ty/src/_match.rs +++ b/crates/ra_hir_ty/src/_match.rs | |||
@@ -1335,6 +1335,20 @@ mod tests { | |||
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | #[test] | 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 | |||
1351 | #[test] | ||
1338 | fn malformed_match_arm_tuple_enum_missing_pattern() { | 1352 | fn malformed_match_arm_tuple_enum_missing_pattern() { |
1339 | let content = r" | 1353 | let content = r" |
1340 | enum Either { | 1354 | enum Either { |