summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-20 11:23:58 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-20 11:23:58 +0800
commit70e274b016a0a285ed62e03193ffa27d3d94b1be (patch)
tree726846c92bcdfd0aaad186445b99b6e52f6e9357 /src
parent2248931ac65ad72736c203aa7ce327113e282440 (diff)
downloadmrust-70e274b016a0a285ed62e03193ffa27d3d94b1be.tar.gz
HIR Typecheck Expr - Hack around quirk where a cast can be a type hint
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/expr_cs.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 97b5ae72..0db9c744 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -2022,6 +2022,7 @@ namespace {
this->m_completed = true;
),
(Path,
+ #if 0
TU_MATCHA( (e.binding), (be),
(Unbound,
BUG(sp, "Encountered unbound type in _Cast Path - " << tgt_ty);
@@ -2043,6 +2044,7 @@ namespace {
ERROR(sp, E0000, "Non-scalar cast to " << this->context.m_ivars.fmt_type(tgt_ty));
)
)
+ #endif
this->context.equate_types_coerce(sp, tgt_ty, node.m_value);
this->m_completed = true;
return ;