diff options
author | John Hodge <tpg@mutabah.net> | 2016-07-14 09:12:00 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-07-14 09:12:00 +0800 |
commit | 52d58d15a7081d633b59a7bdecbd39b2fda19487 (patch) | |
tree | 6bac0ad5d0db11266e7e4cf13c822844d5adef81 | |
parent | 0383d4dc00d3e20ba45f21213fd1c2be2fc85e3e (diff) | |
download | mrust-52d58d15a7081d633b59a7bdecbd39b2fda19487.tar.gz |
HIR Typecheck - Use a proper fuzzy match when comparing bound type params
-rw-r--r-- | src/hir_typeck/helpers.cpp | 10 |
1 files changed, 1 insertions, 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); |