diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-28 20:19:18 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-28 20:19:18 +1100 |
commit | 59d95e289122a84ea057ff5ed15d7d0e583138ed (patch) | |
tree | 663b285db0a406a8fbe181a89a3dc4f61accca6b /src/hir/hir.cpp | |
parent | bd913f6259896ce7317061e3607f3c8fd2371d89 (diff) | |
download | mrust-59d95e289122a84ea057ff5ed15d7d0e583138ed.tar.gz |
AST - Add asm! as an AST node
Diffstat (limited to 'src/hir/hir.cpp')
-rw-r--r-- | src/hir/hir.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hir/hir.cpp b/src/hir/hir.cpp index 2ec4d40b..18b09fac 100644 --- a/src/hir/hir.cpp +++ b/src/hir/hir.cpp @@ -512,8 +512,6 @@ bool ::HIR::TraitImpl::more_specific_than(const ::HIR::TraitImpl& other) const return false; } - //assert(m_params.m_types.size() == other.m_params.m_types.size()); - if( other.m_params.m_bounds.size() == 0 ) { return m_params.m_bounds.size() > 0; } @@ -527,13 +525,14 @@ bool ::HIR::TraitImpl::more_specific_than(const ::HIR::TraitImpl& other) const DEBUG("bounds_t = " << bounds_t); DEBUG("bounds_o = " << bounds_o); + // If there are less bounds in this impl, it can't be more specific. if( bounds_t.size() < bounds_o.size() ) return false; auto it_t = bounds_t.begin(); for(auto it_o = bounds_o.begin(); it_o != bounds_o.end(); ++it_o) { - // TODO: `T: Foo<T>` is more specific than `T: Foo<U>` + // TODO: `T: Foo<T>` is more specific than `T: Foo<U>`, this method doesn't pick that. while( ::ord(*it_t, *it_o) == OrdLess && it_t != bounds_t.end() ) ++ it_t; if( it_t == bounds_t.end() || ::ord(*it_t, *it_o) > OrdEqual ) { |