aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-04-04 15:37:33 +0100
committerPhilip Herron <philip.herron@embecosm.com>2023-04-05 09:24:55 +0000
commit4713107dffad79ac0c7863411928b536f90f768a (patch)
treecb3f6ed1c63464a652823e4fb6ac3c2d1d903837 /gcc/rust/backend/rust-compile-resolve-path.cc
parentde9adfef3d008230ef165b1a3bf8c12bb0f7b6d5 (diff)
downloadgcc-4713107dffad79ac0c7863411928b536f90f768a.zip
gcc-4713107dffad79ac0c7863411928b536f90f768a.tar.gz
gcc-4713107dffad79ac0c7863411928b536f90f768a.tar.bz2
gccrs: remove unused code in query_compile
gcc/rust/ChangeLog: * backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): remove unused Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index ceea4f6..b7f1069 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -212,17 +212,6 @@ HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup,
bool is_impl_item = resolved_item != nullptr;
if (is_impl_item)
{
- rust_assert (parent_impl_id != UNKNOWN_HIRID);
- HIR::Item *impl_ref
- = ctx->get_mappings ()->lookup_hir_item (parent_impl_id);
- rust_assert (impl_ref != nullptr);
- HIR::ImplBlock *impl = static_cast<HIR::ImplBlock *> (impl_ref);
-
- TyTy::BaseType *self = nullptr;
- bool ok = ctx->get_tyctx ()->lookup_type (
- impl->get_type ()->get_mappings ().get_hirid (), &self);
- rust_assert (ok);
-
if (!lookup->has_subsititions_defined ())
return CompileInherentImplItem::Compile (resolved_item, ctx,
nullptr, true, expr_locus);