summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-07-17 14:55:12 +0800
committerJohn Hodge <tpg@mutabah.net>2016-07-17 14:55:12 +0800
commite60fab8b9a02db25645ebe6978d356ee9cf72459 (patch)
tree199ee721b3e7ebe88df99a73490418fd5afe6fbd
parent85ea9852a5b04cfd9f121be5afe887b9e1de9ba7 (diff)
downloadmrust-e60fab8b9a02db25645ebe6978d356ee9cf72459.tar.gz
HIR Typecheck CS - Account for associated type equality application in coercion.
-rw-r--r--src/hir_typeck/expr_cs.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index 7b304f9d..c6088cae 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -2881,10 +2881,10 @@ namespace {
return false;
)
else {
- // Error - Must be compatible
- // - Hand off to equate
+ // Error: Must be compatible, hand over to the equate code.
+ // - If this returns early, it's because of a UFCS destructure
context.equate_types(sp, ty, ty_r);
- BUG(sp, "Type error expected " << ty << " == " << ty_r);
+ //BUG(sp, "Type error expected " << ty << " == " << ty_r);
}
),
(Pointer,
@@ -2925,9 +2925,10 @@ namespace {
return false;
)
else {
- // Error: Must be compatible
+ // Error: Must be compatible, hand over to the equate code.
+ // - If this returns early, it's because of a UFCS destructure
context.equate_types(sp, ty, ty_r);
- BUG(sp, "Type error expected " << ty << " == " << ty_r);
+ //BUG(sp, "Type error expected " << ty << " == " << ty_r);
}
),
(Function,