Skip to content

Commit 40ba878

Browse files
committed
gccrs: remove similar hack in type paths as we had in path expressions
This keeps the resolution code in line with paths. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-type.cc: remove hack Addresses #2723
1 parent aa1550d commit 40ba878

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

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

-16
Original file line numberDiff line numberDiff line change
@@ -543,22 +543,6 @@ TypeCheckType::resolve_segments (
543543
}
544544

545545
context->insert_receiver (expr_mappings.get_hirid (), prev_segment);
546-
if (tyseg->needs_generic_substitutions ())
547-
{
548-
// location_t locus = segments.back ()->get_locus ();
549-
if (!prev_segment->needs_generic_substitutions ())
550-
{
551-
auto used_args_in_prev_segment
552-
= GetUsedSubstArgs::From (prev_segment);
553-
if (!used_args_in_prev_segment.is_error ())
554-
tyseg
555-
= SubstMapperInternal::Resolve (tyseg, used_args_in_prev_segment);
556-
}
557-
558-
if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
559-
return new TyTy::ErrorType (expr_id);
560-
}
561-
562546
rust_assert (resolved_node_id != UNKNOWN_NODEID);
563547

564548
// lookup if the name resolver was able to canonically resolve this or not

0 commit comments

Comments
 (0)