diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-30 20:41:46 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-30 20:41:46 +0800 |
commit | d0ff2392e7d015174d300a2818f613bc0257679c (patch) | |
tree | 44e95ec77610602cea3951da6e59fcdad0f18c67 | |
parent | b7a8e5319b14d6513cd6f1aabc4b279a2c1430d1 (diff) | |
download | mrust-d0ff2392e7d015174d300a2818f613bc0257679c.tar.gz |
HIR Typecheck Static - Expand associated when doing auto trait searches
-rw-r--r-- | src/hir_typeck/static.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp index eba58331..32fb817e 100644 --- a/src/hir_typeck/static.cpp +++ b/src/hir_typeck/static.cpp @@ -656,7 +656,9 @@ bool StaticTraitResolve::find_impl__check_crate( // HELPER: Get a possibily monomorphised version of the input type (stored in `tmp` if needed) auto monomorph_get = [&](const auto& ty)->const auto& { if( monomorphise_type_needed(ty) ) { - return (tmp = monomorphise_type_with(sp, ty, monomorph_cb)); + tmp = monomorphise_type_with(sp, ty, monomorph_cb); + this->expand_associated_types(sp, tmp); + return tmp; } else { return ty; @@ -746,7 +748,7 @@ bool StaticTraitResolve::find_impl__check_crate( BUG(sp, "UfcsUnknown in typeck - " << type); ), (UfcsKnown, - TODO(sp, "Check trait bounds for bound on " << type); + TODO(sp, "Check trait bounds for bound on UfcsKnown " << type); ), (UfcsInherent, TODO(sp, "Auto trait lookup on UFCS Inherent type"); |