aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-04-28 13:09:15 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-04-28 13:09:15 +0100
commitbe158fc97f7f4d43d60797f2af27c86753b0ffb5 (patch)
tree3d0f3aaef56b6190bf19ef2722add0047afce145 /gcc/rust/backend/rust-compile-resolve-path.cc
parent712ae2f173df0c2d9018bf5ce708ffbbaee10d64 (diff)
downloadgcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.zip
gcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.tar.gz
gcc-be158fc97f7f4d43d60797f2af27c86753b0ffb5.tar.bz2
Complete refactor of generic traits handling
From PR #1086 I introduced a new setup_associated_types2 interface which is used to ensure we handle the complex associated types in libcore slices but this interface was inconsistant as well as the get_projected_type. This path refactors the code base to get rid of the old setup_associated_types interface in favour of this new one. It also removes the get_projected_type interface which was not going to work either. Fixes #1105
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.cc15
1 files changed, 0 insertions, 15 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index 2ad672d..55a2fff 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -251,21 +251,6 @@ HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup,
rust_assert (ok); // found
rust_assert (trait_item_ref->is_optional ()); // has definition
- Analysis::NodeMapping trait_mappings
- = trait_item_ref->get_parent_trait_mappings ();
-
- HirId associated_impl_id;
- ok = ctx->get_tyctx ()->lookup_associated_impl_mapping_for_self (
- trait_mappings.get_hirid (), receiver, &associated_impl_id);
- rust_assert (ok);
-
- Resolver::AssociatedImplTrait *associated = nullptr;
- bool found_associated_trait_impl
- = ctx->get_tyctx ()->lookup_associated_trait_impl (
- associated_impl_id, &associated);
- rust_assert (found_associated_trait_impl);
- associated->setup_associated_types ();
-
return CompileTraitItem::Compile (
trait_item_ref->get_hir_trait_item (), ctx, lookup, true,
expr_locus);