[gcc r14-7461] gccrs: remove unused code in query_compile

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 17:36:44 GMT 2024


https://gcc.gnu.org/g:92641136c7e1f8a1aa165963b4371536a3854dc4

commit r14-7461-g92641136c7e1f8a1aa165963b4371536a3854dc4
Author: Philip Herron <herron.philip@googlemail.com>
Date:   Tue Apr 4 15:37:33 2023 +0100

    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>

Diff:
---
 gcc/rust/backend/rust-compile-resolve-path.cc | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index f9c509df2c3..6c9f80edec3 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);


More information about the Gcc-cvs mailing list