diff options
-rw-r--r-- | src/hir_typeck/helpers.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index f74ef4f0..1a9382b6 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -2621,6 +2621,10 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, BUG(sp, "UfcsUnknown in typeck - " << type); ), (UfcsKnown, + // If unbound, use Fuzzy + if(e.binding.is_Unbound()) + return ::HIR::Compare::Fuzzy; + // Otherwise, it's opaque. Check the bounds on the trait. TODO(sp, "Check trait bounds for bound on " << type); ), (UfcsInherent, @@ -2629,6 +2633,9 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, ) return res; ) + else TU_IFLET( ::HIR::TypeRef::Data, type.m_data, Generic, e, + TODO(sp, "Check trait bounds on " << type); + ) else TU_IFLET( ::HIR::TypeRef::Data, type.m_data, Tuple, e, ::HIR::Compare res = ::HIR::Compare::Equal; for(const auto& sty : e) |