Skip to content

Commit 4b3858e

Browse files
committed
gccrs: Remove old hack from resolve operator overload
This was an old chunk of code to try and sort out the Self type on resolving methods for impl blocks. But this is not required when our unify code works properly. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-expr.cc: remove old hack Signed-off-by: Philip Herron <[email protected]>
1 parent 6431cff commit 4b3858e

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

gcc/rust/typecheck/rust-hir-type-check-expr.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,24 +2034,6 @@ TypeCheckExpr::resolve_operator_overload (
20342034
rust_debug ("is_impl_item_candidate: %s",
20352035
resolved_candidate.is_impl_candidate () ? "true" : "false");
20362036

2037-
if (resolved_candidate.is_impl_candidate ())
2038-
{
2039-
auto infer_arguments = TyTy::SubstitutionArgumentMappings::error ();
2040-
HIR::ImplBlock &impl = *resolved_candidate.item.impl.parent;
2041-
TyTy::BaseType *impl_self_infer
2042-
= TypeCheckItem::ResolveImplBlockSelfWithInference (impl,
2043-
expr.get_locus (),
2044-
&infer_arguments);
2045-
if (impl_self_infer->get_kind () == TyTy::TypeKind::ERROR)
2046-
{
2047-
return false;
2048-
}
2049-
if (!infer_arguments.is_empty ())
2050-
{
2051-
lookup = SubstMapperInternal::Resolve (lookup, infer_arguments);
2052-
}
2053-
}
2054-
20552037
// in the case where we resolve to a trait bound we have to be careful we are
20562038
// able to do so there is a case where we are currently resolving the deref
20572039
// operator overload function which is generic and this might resolve to the

0 commit comments

Comments
 (0)