remove UnsupportedPattern variant in mono patterns

This commit is contained in:
Folkert 2020-12-29 00:48:56 +01:00
parent fefb1f3739
commit f8e04619b8
5 changed files with 31 additions and 25 deletions

View file

@ -379,7 +379,7 @@ fn test_at_path<'a>(selected_path: &Path, branch: &Branch<'a>, all_tests: &mut V
match pattern {
// TODO use guard!
Identifier(_) | Underscore | UnsupportedPattern(_) => {
Identifier(_) | Underscore => {
if let Guard::Guard { symbol, id, stmt } = guard {
all_tests.push(Guarded {
opt_test: None,
@ -531,7 +531,7 @@ fn to_relevant_branch_help<'a>(
use Test::*;
match pattern {
Identifier(_) | Underscore | UnsupportedPattern(_) => Some(branch.clone()),
Identifier(_) | Underscore => Some(branch.clone()),
RecordDestructure(destructs, _) => match test {
IsCtor {
@ -742,7 +742,7 @@ fn needs_tests<'a>(pattern: &Pattern<'a>) -> bool {
use Pattern::*;
match pattern {
Identifier(_) | Underscore | UnsupportedPattern(_) => false,
Identifier(_) | Underscore => false,
RecordDestructure(_, _)
| AppliedTag { .. }