]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: remove unused code in query_compile
authorPhilip Herron <herron.philip@googlemail.com>
Tue, 4 Apr 2023 14:37:33 +0000 (15:37 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:45 +0000 (18:28 +0100)
gcc/rust/ChangeLog:

* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile): remove unused

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/backend/rust-compile-resolve-path.cc

index f9c509df2c39b5a02c5ddcee936fe613e3b83ddd..6c9f80edec305caff097ade24d897cee8646bf7d 100644 (file)
@@ -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);