summaryrefslogtreecommitdiff
path: root/src/hir/type.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-17 15:27:53 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-17 15:27:53 +0800
commitee88b79f163a699b6e9123fa322e906c5f95aa66 (patch)
tree70be7562f8fce322941717ea7486135c473db32c /src/hir/type.cpp
parentcc772e2ac06fda3f872c90cb24c59654f9f4f1c0 (diff)
downloadmrust-ee88b79f163a699b6e9123fa322e906c5f95aa66.tar.gz
HIR Typecheck Expr - Extend Opaque=fuzzy hack
Diffstat (limited to 'src/hir/type.cpp')
-rw-r--r--src/hir/type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hir/type.cpp b/src/hir/type.cpp
index fafbc670..b430f2b5 100644
--- a/src/hir/type.cpp
+++ b/src/hir/type.cpp
@@ -648,6 +648,10 @@ bool ::HIR::TypeRef::match_test_generics(const Span& sp, const ::HIR::TypeRef& x
if( te.binding.is_Unbound() || xe.binding.is_Unbound() ) {
rv = ::HIR::Compare::Fuzzy;
}
+ if( te.binding.is_Opaque() ) {
+ DEBUG("- Fuzzy match due to opaque");
+ return Compare::Fuzzy;
+ }
}
return rv;
),