diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-01-19 18:06:27 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-01-19 18:06:27 +0800 |
commit | 0af7f41208356599ad367a55e089112ebe46929b (patch) | |
tree | 067774700db3f094f3cd9346a62296544c36cef0 /src | |
parent | 6d7e663c8fb339e3cea89f32c4767fbd3fccea93 (diff) | |
download | mrust-0af7f41208356599ad367a55e089112ebe46929b.tar.gz |
Typecheck Expressions - Handle generics in auto trait magic
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/helpers.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hir_typeck/helpers.cpp b/src/hir_typeck/helpers.cpp index 0c76b4e5..1af269ad 100644 --- a/src/hir_typeck/helpers.cpp +++ b/src/hir_typeck/helpers.cpp @@ -2733,7 +2733,9 @@ bool TraitResolution::find_trait_impls_crate(const Span& sp, return res; ) else TU_IFLET( ::HIR::TypeRef::Data, type.m_data, Generic, e, - TODO(sp, "Check trait bounds on " << type); + auto l_res = ::HIR::Compare::Unequal; + this->find_trait_impls(sp, trait, *params_ptr, type, [&](auto, auto cmp){ l_res = cmp; return (cmp == ::HIR::Compare::Equal); }); + return l_res; ) else TU_IFLET( ::HIR::TypeRef::Data, type.m_data, Tuple, e, ::HIR::Compare res = ::HIR::Compare::Equal; |