From 52d58d15a7081d633b59a7bdecbd39b2fda19487 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 14 Jul 2016 09:12:00 +0800 Subject: HIR Typecheck - Use a proper fuzzy match when comparing bound type params --- src/hir_typeck/helpers.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index a7094f5d..f8483cdc 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -1693,16 +1693,8 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, impl_params[idx] = &ty; return ::HIR::Compare::Equal; } - else if( this->m_ivars.types_equal(*impl_params[idx], ty) ) { - // Fall - return ::HIR::Compare::Equal; - } - else if( ty.m_data.is_Infer() ) { - // Fall - return (match = ::HIR::Compare::Fuzzy); - } else { - return (match = ::HIR::Compare::Unequal); + return impl_params[idx]->compare_with_placeholders(sp, ty, this->m_ivars.callback_resolve_infer()); } }; match &= impl.m_type.match_test_generics_fuzz(sp, type , this->m_ivars.callback_resolve_infer(), cb); -- cgit v1.2.3