summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-09-23 10:18:26 +0800
committerJohn Hodge <tpg@mutabah.net>2016-09-23 10:18:26 +0800
commite652bbb8630bc0c6708ca2a88d3d9938c8b9982a (patch)
treea4750ab090f7f856957cd54329419bc80e116f97
parentf8471947dfc2705a6bd4b74dd7f33125d67fc527 (diff)
downloadmrust-e652bbb8630bc0c6708ca2a88d3d9938c8b9982a.tar.gz
HIR Typecheck Expr - Implement TODO with inserting associated type bounds
-rw-r--r--src/hir_typeck/expr_cs.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index ce7ef629..aecb7506 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -4042,7 +4042,10 @@ namespace {
DEBUG("- " << b_ty_mono << " : " << b_tp_mono);
if( b_tp_mono.m_type_bounds.size() > 0 )
{
- TODO(sp, "Insert associated type bounds from " << b_ty_mono << " : " << b_tp_mono);
+ for(const auto& aty_bound : b_tp_mono.m_type_bounds)
+ {
+ context.equate_types_assoc(sp, aty_bound.second, b_tp_mono.m_path.m_path, b_tp_mono.m_path.m_params.clone(), b_ty_mono, aty_bound.first.c_str(), false);
+ }
}
else
{