summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-07 10:07:24 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-07 10:07:24 +0800
commit706bd60749dae86595bf90548ac6561a6e97e017 (patch)
tree479e7e5fa1126faddbda86f2ea45a660e2001fa8 /src
parente9fd7bc63bbad9e24ef2cdef6f10901b236a4985 (diff)
downloadmrust-706bd60749dae86595bf90548ac6561a6e97e017.tar.gz
HIR Typecheck Expr - (minor) Fiddling with find_named_trait_in_trait
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/helpers.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp
index 3578bceb..1ada84a8 100644
--- a/src/hir_typeck/helpers.cpp
+++ b/src/hir_typeck/helpers.cpp
@@ -1799,7 +1799,7 @@ bool TraitResolution::find_named_trait_in_trait(const Span& sp,
t_cb_trait_impl callback
) const
{
- TRACE_FUNCTION_F(des << " from " << trait_path << pp);
+ TRACE_FUNCTION_F(des << des_params << " from " << trait_path << pp);
if( pp.m_types.size() != trait_ptr.m_params.m_types.size() ) {
BUG(sp, "Incorrect number of parameters for trait");
}
@@ -1819,8 +1819,12 @@ bool TraitResolution::find_named_trait_in_trait(const Span& sp,
DEBUG(pt << " => " << pt_mono);
if( pt.m_path.m_path == des ) {
- // TODO: What if there's two bounds of the same trait with different params?
- callback( target_type, pt_mono.m_path.m_params, pt_mono.m_type_bounds );
+ // NOTE: Doesn't quite work...
+ //auto cmp = this->compare_pp(sp, pt_mono.m_path.m_params, des_params);
+ //if( cmp != ::HIR::Compare::Unequal )
+ //{
+ callback( target_type, pt_mono.m_path.m_params, pt_mono.m_type_bounds );
+ //}
return true;
}