summaryrefslogtreecommitdiff
path: root/src/hir/path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hir/path.cpp')
-rw-r--r--src/hir/path.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/hir/path.cpp b/src/hir/path.cpp
index 7f9d2fc9..1f80204d 100644
--- a/src/hir/path.cpp
+++ b/src/hir/path.cpp
@@ -87,10 +87,10 @@ namespace HIR {
return os << e;
),
(UfcsInherent,
- return os << "<" << *e.type << ">::" << e.item << e.params;
+ return os << "<" << *e.type << " /*- " << e.impl_params << "*/>::" << e.item << e.params;
),
(UfcsKnown,
- return os << "<" << *e.type << " as " << e.trait << ">::" << e.item << e.params;
+ return os << "<" << *e.type << " as " << e.trait << " /*- " << e.impl_params << "*/>::" << e.item << e.params;
),
(UfcsUnknown,
return os << "<" << *e.type << " as _>::" << e.item << e.params;
@@ -255,6 +255,22 @@ bool ::HIR::TraitPath::operator==(const ::HIR::TraitPath& x) const
}
return rv;
}
+::HIR::Compare HIR::PathParams::match_test_generics_fuzz(const Span& sp, const PathParams& x, t_cb_resolve_type resolve_placeholder, t_cb_match_generics match) const
+{
+ using ::HIR::Compare;
+ auto rv = Compare::Equal;
+
+ if( this->m_types.size() != x.m_types.size() ) {
+ return Compare::Unequal;
+ }
+ for( unsigned int i = 0; i < x.m_types.size(); i ++ )
+ {
+ rv &= this->m_types[i].match_test_generics_fuzz( sp, x.m_types[i], resolve_placeholder, match );
+ if( rv == Compare::Unequal )
+ return Compare::Unequal;
+ }
+ return rv;
+}
::HIR::Compare HIR::GenericPath::compare_with_placeholders(const Span& sp, const ::HIR::GenericPath& x, ::HIR::t_cb_resolve_type resolve_placeholder) const
{
using ::HIR::Compare;