summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 5a0ca03a..59714d8b 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1008,17 +1008,11 @@ namespace {
TU_MATCH_DEF( ::HIR::TypeRef::Data, (ty_val.m_data), (te),
(
- if( m_builder.lang_Box() )
+ if( m_builder.is_type_owned_box( ty_val ) )
{
- if( ty_val.m_data.is_Path()
- && ty_val.m_data.as_Path().path.m_data.is_Generic()
- && ty_val.m_data.as_Path().path.m_data.as_Generic().m_path == *m_builder.lang_Box()
- )
- {
- // Box magically derefs.
- // HACK: Break out of the switch used for TU_MATCH_DEF
- break;
- }
+ // Box magically derefs.
+ // HACK: Break out of the switch used for TU_MATCH_DEF
+ break;
}
BUG(sp, "Deref on unsupported type - " << ty_val);
),