summaryrefslogtreecommitdiff
path: root/src/trans/enumerate.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-01-12 18:59:30 +0800
committerJohn Hodge <tpg@mutabah.net>2017-01-12 18:59:30 +0800
commit2a38cca61982e1d3e44166d8da6c20a3191520a6 (patch)
treee103976a3d6b7266646669cd15425e5e7ed9be95 /src/trans/enumerate.cpp
parent01cdd1d7bec0106a43f851d73a1faf7627652970 (diff)
downloadmrust-2a38cca61982e1d3e44166d8da6c20a3191520a6.tar.gz
Trans Enumerate - EAT vtable associted type parameters
Diffstat (limited to 'src/trans/enumerate.cpp')
-rw-r--r--src/trans/enumerate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/trans/enumerate.cpp b/src/trans/enumerate.cpp
index 26496aaf..3af2e728 100644
--- a/src/trans/enumerate.cpp
+++ b/src/trans/enumerate.cpp
@@ -925,6 +925,7 @@ void Trans_Enumerate_Types(EnumState& state)
}
for(const auto& ent : state.rv.m_vtables)
{
+ TRACE_FUNCTION_F("vtable " << ent.first);
const auto& gpath = ent.first.m_data.as_UfcsKnown().trait;
const auto& trait = state.crate.get_trait_by_path(sp, gpath.m_path);
@@ -934,7 +935,6 @@ void Trans_Enumerate_Types(EnumState& state)
// Copy the param set from the trait in the trait object
::HIR::PathParams vtable_params = gpath.m_params.clone();
// - Include associated types on bound
- #if 1
for(const auto& ty_idx : trait.m_type_indexes)
{
auto idx = ty_idx.second;
@@ -943,8 +943,8 @@ void Trans_Enumerate_Types(EnumState& state)
auto p = ent.first.clone();
p.m_data.as_UfcsKnown().item = ty_idx.first;
vtable_params.m_types[idx] = ::HIR::TypeRef::new_path( mv$(p), {} );
+ tv.m_resolve.expand_associated_types( sp, vtable_params.m_types[idx] );
}
- #endif
tv.visit_type( ::HIR::TypeRef( ::HIR::GenericPath(vtable_ty_spath, mv$(vtable_params)), &vtable_ref ) );
}