summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-07 10:27:35 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-07 10:27:35 +0800
commit11c077f6f9fa2b97da1cb5e6ac9659d88092d371 (patch)
treec916f12d6702f05f0557f7c8f9b189075757a6a9 /src
parent007fe5a22129b5c782d0a8a7f46f0c68d718ef93 (diff)
downloadmrust-11c077f6f9fa2b97da1cb5e6ac9659d88092d371.tar.gz
HIR Typecheck Static - Expand associated types in monomorphised bound types, allow ivars
Diffstat (limited to 'src')
-rw-r--r--src/hir_typeck/static.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp
index bc1f5fe1..426f9cb0 100644
--- a/src/hir_typeck/static.cpp
+++ b/src/hir_typeck/static.cpp
@@ -390,6 +390,7 @@ bool StaticTraitResolve::find_impl__check_crate(
(TraitBound,
DEBUG("[find_impl] Trait bound " << e.type << " : " << e.trait);
auto b_ty_mono = monomorphise_type_with(sp, e.type, cb_monomorph);
+ this->expand_associated_types(sp, b_ty_mono);
auto b_tp_mono = monomorphise_traitpath_with(sp, e.trait, cb_monomorph, false);
for(auto& ty : b_tp_mono.m_path.m_params.m_types) {
this->expand_associated_types(sp, ty);
@@ -466,7 +467,9 @@ void StaticTraitResolve::expand_associated_types(const Span& sp, ::HIR::TypeRef&
TRACE_FUNCTION_F(input);
TU_MATCH(::HIR::TypeRef::Data, (input.m_data), (e),
(Infer,
- BUG(sp, "Encountered inferrence variable in static context");
+ //if( m_treat_ivars_as_bugs ) {
+ // BUG(sp, "Encountered inferrence variable in static context");
+ //}
),
(Diverge,
),