summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-27 13:30:41 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-27 13:30:41 +0800
commit4e9d392a6db70d13cf416848c0a8744044cf4e95 (patch)
tree51b9271ad58d8da4dc3cae4ec4b46fb4286f8de5
parent61c3857959b4e904a6dd5e7809355395a0ebb769 (diff)
downloadmrust-4e9d392a6db70d13cf416848c0a8744044cf4e95.tar.gz
HIR Typecheck Expr - Don't take guesses if an ivar was aliased
-rw-r--r--src/hir_typeck/expr_cs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index a8524d71..8c498220 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -5081,7 +5081,7 @@ namespace {
ty_l_ivar.m_data.as_Infer().index = i;
const auto& ty_l = context.m_ivars.get_type(ty_l_ivar);
- if( !ty_l.m_data.is_Infer() ) {
+ if( ty_l != ty_l_ivar ) {
DEBUG("- IVar " << i << " had possibilities, but was known to be " << ty_l);
// Completely clear by reinitialising
ivar_ent = Context::IVarPossible();