]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: remove similar hack in type paths as we had in path expressions
authorPhilip Herron <herron.philip@googlemail.com>
Sat, 3 Feb 2024 11:46:42 +0000 (11:46 +0000)
committerPhilip Herron <philip.herron@embecosm.com>
Sun, 4 Feb 2024 00:21:21 +0000 (00:21 +0000)
This keeps the resolution code in line with paths.

Addresses #2723

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-type.cc: remove hack

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

index 56f2cf5dae31dd939d3eb909cc31043d74668f37..2766029c744aa338ff252795ba8981269c6e4e08 100644 (file)
@@ -572,22 +572,6 @@ TypeCheckType::resolve_segments (
     }
 
   context->insert_receiver (expr_mappings.get_hirid (), prev_segment);
-  if (tyseg->needs_generic_substitutions ())
-    {
-      // location_t locus = segments.back ()->get_locus ();
-      if (!prev_segment->needs_generic_substitutions ())
-       {
-         auto used_args_in_prev_segment
-           = GetUsedSubstArgs::From (prev_segment);
-         if (!used_args_in_prev_segment.is_error ())
-           tyseg
-             = SubstMapperInternal::Resolve (tyseg, used_args_in_prev_segment);
-       }
-
-      if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
-       return new TyTy::ErrorType (expr_id);
-    }
-
   rust_assert (resolved_node_id != UNKNOWN_NODEID);
 
   // lookup if the name resolver was able to canonically resolve this or not