summaryrefslogtreecommitdiff
path: root/src/hir_typeck/expr_check.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-01-14 17:01:36 +0800
committerJohn Hodge <tpg@mutabah.net>2017-01-14 17:01:36 +0800
commit63fb307fb112dcf3abb73c1da0dfb5a27935f4eb (patch)
tree5473ed81b50a4571ab7eca0da9dbcbaf53092ee0 /src/hir_typeck/expr_check.cpp
parent53983bf333143560ef4b161eaa2f46c55bcd517b (diff)
downloadmrust-63fb307fb112dcf3abb73c1da0dfb5a27935f4eb.tar.gz
HIR - Build up a flattened list of parent traits early to save time later
Diffstat (limited to 'src/hir_typeck/expr_check.cpp')
-rw-r--r--src/hir_typeck/expr_check.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hir_typeck/expr_check.cpp b/src/hir_typeck/expr_check.cpp
index f435696e..4f7bb5f4 100644
--- a/src/hir_typeck/expr_check.cpp
+++ b/src/hir_typeck/expr_check.cpp
@@ -767,7 +767,8 @@ namespace {
// TODO: Either - Don't include the above impl bound, or change the below trait to the one that has that type
for( const auto& assoc : be.trait.m_type_bounds ) {
::HIR::GenericPath type_trait_path;
- m_resolve.trait_contains_type(sp, real_trait, *be.trait.m_trait_ptr, assoc.first, type_trait_path);
+ bool has_ty = m_resolve.trait_contains_type(sp, real_trait, *be.trait.m_trait_ptr, assoc.first, type_trait_path);
+ ASSERT_BUG(sp, has_ty, "Type " << assoc.first << " not found in chain of " << real_trait);
auto other_ty = monomorphise_type_with(sp, assoc.second, cache.m_monomorph_cb, true);