diff options
author | Philip Herron <herron.philip@googlemail.com> | 2024-02-03 11:46:42 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-02-07 12:40:23 +0100 |
commit | 229f2a709b72da6ea12f2069d567fd9f9bc1891e (patch) | |
tree | 97167c5c4ef023689606d5a1aa6f8effaf6b6217 /gcc/rust | |
parent | f1d0b22c79316d8ee403c83be55ef45186bea38a (diff) |
gccrs: remove similar hack in type paths as we had in path expressions
This keeps the resolution code in line with paths.
Addresses #2723
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc: remove hack
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-type.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-type.cc b/gcc/rust/typecheck/rust-hir-type-check-type.cc index 0d108c3959c..74a12c4b011 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-type.cc +++ b/gcc/rust/typecheck/rust-hir-type-check-type.cc @@ -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 |