summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r--src/mir/from_hir_match.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index 3ea61cf9..a2d786d8 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -949,6 +949,7 @@ void PatternRulesetBuilder::append_from(const Span& sp, const ::HIR::Pattern& pa
}
),
(Tuple,
+ ASSERT_BUG(sp, pe.glob_pos == ::HIR::Pattern::GlobPos::None, "Tuple .. should be eliminated");
assert(e.size() == pe.sub_patterns.size());
for(unsigned int i = 0; i < e.size(); i ++) {
this->append_from(sp, pe.sub_patterns[i], e[i]);
@@ -996,9 +997,6 @@ void PatternRulesetBuilder::append_from(const Span& sp, const ::HIR::Pattern& pa
),
(StructTuple,
TODO(sp, "Match over struct - Tuple + StructTuple");
- ),
- (StructTupleWildcard,
- TODO(sp, "Match over struct - Tuple + StructTupleWildcard");
)
)
),
@@ -1053,9 +1051,6 @@ void PatternRulesetBuilder::append_from(const Span& sp, const ::HIR::Pattern& pa
}
this->push_rule( PatternRule::make_Variant({ pe.binding_idx, mv$(sub_builder.m_rules) }) );
),
- (EnumTupleWildcard,
- this->push_rule( PatternRule::make_Variant({ pe.binding_idx, {} }) );
- ),
(EnumStruct,
const auto& var_def = pe.binding_ptr->m_variants.at(pe.binding_idx);
const auto& fields_def = var_def.second.as_Struct();