diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/static.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/hir_typeck/static.cpp b/src/hir_typeck/static.cpp index 9287440f..050ca392 100644 --- a/src/hir_typeck/static.cpp +++ b/src/hir_typeck/static.cpp @@ -739,23 +739,8 @@ void StaticTraitResolve::expand_associated_types__UfcsKnown(const Span& sp, ::HI this->expand_associated_types(sp, input); return; } - /* - if( best_impl.is_valid() ) { - auto nt = best_impl.get_type( e2.item.c_str() ); - DEBUG("Converted UfcsKnown (best specialisation) - " << e.path << " = " << nt); - input = mv$(nt); - - this->expand_associated_types(sp, input); - return; - } - */ - // If the type is a generic or an opaque associated, we can't know. - // - If the trait contains any of the above, it's unknowable - // - Otherwise, it's an error - e.binding = ::HIR::TypeRef::TypePathBinding::make_Opaque({}); - this->replace_equalities(input); - DEBUG("Couldn't resolve associated type for " << input << " (and won't ever be able to, assuming opaque)"); + ERROR(sp, E0000, "Cannot find an implementation of " << trait_path << " for " << *e2.type); } void StaticTraitResolve::replace_equalities(::HIR::TypeRef& input) const |