mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
match checking add additional test for match checking tuple with missing pattern
This commit is contained in:
parent
941615748d
commit
36c110ee09
1 changed files with 14 additions and 0 deletions
|
@ -1334,6 +1334,20 @@ mod tests {
|
|||
check_diagnostic(content);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn malformed_match_arm_tuple_missing_pattern() {
|
||||
let content = r"
|
||||
fn test_fn() {
|
||||
match (0) {
|
||||
() => (),
|
||||
}
|
||||
}
|
||||
";
|
||||
|
||||
// Match arms with the incorrect type are filtered out.
|
||||
check_diagnostic(content);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn malformed_match_arm_tuple_enum_missing_pattern() {
|
||||
let content = r"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue