Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions gcc/rust/typecheck/rust-hir-type-check-expr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2034,24 +2034,6 @@ TypeCheckExpr::resolve_operator_overload (
rust_debug ("is_impl_item_candidate: %s",
resolved_candidate.is_impl_candidate () ? "true" : "false");

if (resolved_candidate.is_impl_candidate ())
{
auto infer_arguments = TyTy::SubstitutionArgumentMappings::error ();
HIR::ImplBlock &impl = *resolved_candidate.item.impl.parent;
TyTy::BaseType *impl_self_infer
= TypeCheckItem::ResolveImplBlockSelfWithInference (impl,
expr.get_locus (),
&infer_arguments);
if (impl_self_infer->get_kind () == TyTy::TypeKind::ERROR)
{
return false;
}
if (!infer_arguments.is_empty ())
{
lookup = SubstMapperInternal::Resolve (lookup, infer_arguments);
}
}

// in the case where we resolve to a trait bound we have to be careful we are
// able to do so there is a case where we are currently resolving the deref
// operator overload function which is generic and this might resolve to the
Expand Down
Loading