Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217513/?format=api
{ "id": 2217513, "url": "http://patchwork.ozlabs.org/api/patches/2217513/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260330021043.3058-1-gerris.rs@gmail.com/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260330021043.3058-1-gerris.rs@gmail.com>", "list_archive_url": null, "date": "2026-03-30T02:10:43", "name": "[gccrs,COMMIT] nr1.0: Remove support in checking phases", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "bb054ac40c25453c5ad70c117f86d8f746db50dd", "submitter": { "id": 92092, "url": "http://patchwork.ozlabs.org/api/people/92092/?format=api", "name": null, "email": "gerris.rs@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260330021043.3058-1-gerris.rs@gmail.com/mbox/", "series": [ { "id": 497945, "url": "http://patchwork.ozlabs.org/api/series/497945/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=497945", "date": "2026-03-30T02:10:43", "name": "[gccrs,COMMIT] nr1.0: Remove support in checking phases", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497945/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217513/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217513/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=hePM+YOe;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=hePM+YOe", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "sourceware.org; spf=pass smtp.mailfrom=gmail.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=74.125.82.44" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkZW10vGlz1yG8\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 13:11:38 +1100 (AEDT)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0F9F44BA901A\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 30 Mar 2026 02:11:36 +0000 (GMT)", "from mail-dl1-f44.google.com (mail-dl1-f44.google.com\n [74.125.82.44])\n by sourceware.org (Postfix) with ESMTPS id D4CE04BA23D5\n for <gcc-patches@gcc.gnu.org>; Mon, 30 Mar 2026 02:10:47 +0000 (GMT)", "by mail-dl1-f44.google.com with SMTP id\n a92af1059eb24-128b9b7e3edso2149948c88.0\n for <gcc-patches@gcc.gnu.org>; Sun, 29 Mar 2026 19:10:47 -0700 (PDT)", "from\n runnervmrg6be.ihssw1sn350e1pn1vuci5amshd.yx.internal.cloudapp.net\n ([172.215.210.113]) by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12ab97efb42sm9430514c88.7.2026.03.29.19.10.44\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 29 Mar 2026 19:10:45 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 0F9F44BA901A", "OpenDKIM Filter v2.11.0 sourceware.org D4CE04BA23D5" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D4CE04BA23D5", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D4CE04BA23D5", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774836648; cv=none;\n b=eyEkEQl5EiUuH3NeLdyzOH8zVZtkxyf1zWIysiQ1WcHRlsGmv3W6YfcOqVJIkiGE/VXBv/3ywH4Dlre060CRxBxL1EeVSyfl6BmsggknANXrGfGLAy7hcd3mRnArwWN9Ro0sl2uOfnh76lP/gBtPHBkw2JSxn6BKyxvzhN8NwbA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774836648; c=relaxed/simple;\n bh=los5cPkx4WqxoVsv2We9ih7B5RshRhVCK5Zs8O4OdlM=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=jdcgT3fc7HebcjZmM4KLYOimrQb5FpBRs5C169aJYfPwqG/siQAFBslGDCg6TZslIjGUmyPtKF3o5NowfpMh/BtiG4gIk9e7pnflhQcb/PQIWAP60JBM1OallUOugNZNq3zpIpq1VeWNaDJAjdjgaR+MJuzaoqSqeRwe+KzZR0k=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774836647; x=1775441447; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=xNbpqyXSMtFDEQNbxdMPs0JxjAnnUg33r6NggbVq8y8=;\n b=hePM+YOe2+7k/UZkgCQz4VV5CuD4KkNcuVJuCzKm1j2BpF1A2joUrcDXnRL2V2BpH+\n I59dUn/n3ocCwrrtEDpH17aJ2/yE2jFWgCT/M7AknKqzVXSADtXsP8vY06pi2j4Cwnqj\n XpMyYqdtZ0xrGzMYRPZA+QUPUal63XhQXO0tPnQwaJat5pmnR6+yU7QCpw0yF8NWxN8e\n 7Rq1Xx9NDHS7GRQcDNqn68X8mXlHfNa7Bs69yX+yevYqPbpPRV96f4klhXZew6II+qos\n 5NzXOpwfE006awbINETtzo29Ay25gbdUskhi3qCqeFiPFD312sIKjToLbYfRGg8PXELF\n 5imQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774836647; x=1775441447;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=xNbpqyXSMtFDEQNbxdMPs0JxjAnnUg33r6NggbVq8y8=;\n b=f+9Nv9D/DS6IL7bbcChaL8GufwxOBDAnx6krm7smPw2AQLgD4P8NzYxU8yCTREyr1k\n wmhWzqAp170jSuvd3i+F9nFLkAzMop5skKfMshD3ColM/HfZ936EgYlur9n6ZNRLTPSw\n qmKhWSIYbCE+tl+OZ+X3j98yTY3r8uGVdzuR6ZfJJPdNjrHtJm6cGJmXNdIjj6fbL3w6\n WXV/QeFhv4qXEkodsk1/GJ0uFF9mnBRTXPPmJqj48HXe+jAFyOSToTaBOqM4mXDb+GDt\n AAEs6T3rY5tNyTvFp+v9wmqBPeGau+VkJZTmGgty4i+ImOTLQ9+XWhy+K2z6o5ZrlPMl\n AeWA==", "X-Gm-Message-State": "AOJu0Yx2iw80eDXC6AfzGDbN3bgh57j6iAHxUDHcqY6VjexNLFuFi6HA\n qaWuV3tqiD7xt0obBFpODHNQ/ioOEgSDLvCmQifuiNz+E2xFmIKdLvwGox80ZA==", "X-Gm-Gg": "ATEYQzxooCx7DgUSElHqREvd7LAqOgEYGK9L2TPq/IEfjcLDARN+AZaP6xjxRWXr6zs\n UTPa7riDdEINit5vm3mwA2qiqQo9xXRr1SiYwe8bQxBowjQ/nnGBlOR1DG/+ZtPVPqywHJTRCWO\n fZumgVRL+c/Ji0j3hJ01HsMASV3okwiTEYjSGKTKeDaVWULttnV0CquNcRRZUjypqT4nzhceZRF\n a0dUZNrLH555EaKsbI+gS9ZdcDIGjnudsYmf39ShlmZHDXvOuSEjF3wDEDsXDu3LerL0KmrXbxj\n keR+yHdugdH7qWYSHlHDhtUg3AOIzfbU6i9TU+ymRAp2Nazm/UX6QvvgQgBa0s2N+E4QJ+3Yl9u\n R2Ys2A7eD2Ngu3Hd2LZOCT8ftytDW/xaW748C7cwhCgXzV65LncTnXXhIAXtGqEnrcIU/zudEDD\n 0v7iD3hh2rrj2TubcX9N7jSICCYtryA/z8Y+XrlNyNP3YaTwBlLlmexz2z5jMMzvXpPtKkEUNmn\n 2rHfL3L0jpVUd7VCG4cmp3/", "X-Received": "by 2002:a05:7022:6182:b0:124:9e46:82d6 with SMTP id\n a92af1059eb24-12ab291277bmr5785501c88.25.1774836646577;\n Sun, 29 Mar 2026 19:10:46 -0700 (PDT)", "From": "gerris.rs@gmail.com", "To": "gcc-patches@gcc.gnu.org,\n\tgcc-rust@gcc.gnu.org", "Cc": "pierre-emmanuel.patry@embecosm.com, arthur.cohen@embecosm.com,\n dkm+gccrs@kataplop.net, Owen Avery <powerboat9.gamer@gmail.com>", "Subject": "[gccrs COMMIT] nr1.0: Remove support in checking phases", "Date": "Mon, 30 Mar 2026 02:10:43 +0000", "Message-ID": "<20260330021043.3058-1-gerris.rs@gmail.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "From: Owen Avery <powerboat9.gamer@gmail.com>\n\ngcc/rust/ChangeLog:\n\n\t* checks/errors/rust-const-checker.cc: Remove inclusion of\n\t\"options.h\".\n\t(ConstChecker::ConstChecker): Initialize 2.0 resolver.\n\t(ConstChecker::visit): Assume nr2.0 is enabled.\n\t* checks/errors/rust-const-checker.h: Adjust includes.\n\t(ConstChecker::resolver): Change type to 2.0 resolver.\n\t* checks/errors/rust-unsafe-checker.cc: Remove inclusion of\n\t\"options.h\".\n\t(UnsafeChecker::UnsafeChecker): Initialize 2.0 resolver.\n\t(UnsafeChecker::visit): Assume nr2.0 is enabled.\n\t* checks/errors/rust-unsafe-checker.h: Adjust includes.\n\t(UnsafeChecker::resolver): Change type to 2.0 resolver.\n\t* checks/lints/rust-lint-marklive.cc\n\t(MarkLive::visit_path_segment): Assume nr2.0 is enabled.\n\t(MarkLive::visit): Likewise.\n\t(MarkLive::find_ref_node_id): Likewise.\n\t* checks/lints/rust-lint-marklive.h: Include\n\t\"rust-immutable-name-resolution-context.h\".\n\t(MarkLive::resolver): Change type to 2.0 resolver, as a\n\treference instead of a pointer.\n\t(MarkLive::MarkLive): Initialize 2.0 resolver.\n\nSigned-off-by: Owen Avery <powerboat9.gamer@gmail.com>\n---\nThis change was merged into the gccrs repository and is posted here for\nupstream visibility and potential drive-by review, as requested by GCC\nrelease managers.\nEach commit email contains a link to its details on github from where you can\nfind the Pull-Request and associated discussions.\n\n\nCommit on github: https://github.com/Rust-GCC/gccrs/commit/b20e3bdfe935f9c601f1488d23f4c7164bedea07\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4108\n\n gcc/rust/checks/errors/rust-const-checker.cc | 20 ++----\n gcc/rust/checks/errors/rust-const-checker.h | 4 +-\n gcc/rust/checks/errors/rust-unsafe-checker.cc | 46 +++-----------\n gcc/rust/checks/errors/rust-unsafe-checker.h | 4 +-\n gcc/rust/checks/lints/rust-lint-marklive.cc | 61 ++++---------------\n gcc/rust/checks/lints/rust-lint-marklive.h | 6 +-\n 6 files changed, 31 insertions(+), 110 deletions(-)\n\n\nbase-commit: bd8aef0b558d313cb05c17a47340c657c4bf1580", "diff": "diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc\nindex 3e4e19121..51ff2583f 100644\n--- a/gcc/rust/checks/errors/rust-const-checker.cc\n+++ b/gcc/rust/checks/errors/rust-const-checker.cc\n@@ -24,14 +24,11 @@\n #include \"rust-system.h\"\n #include \"rust-immutable-name-resolution-context.h\"\n \n-// for flag_name_resolution_2_0\n-#include \"options.h\"\n-\n namespace Rust {\n namespace HIR {\n \n ConstChecker::ConstChecker ()\n- : resolver (*Resolver::Resolver::get ()),\n+ : resolver (Resolver2_0::ImmutableNameResolutionContext::get ().resolver ()),\n mappings (Analysis::Mappings::get ())\n {}\n \n@@ -358,18 +355,9 @@ ConstChecker::visit (CallExpr &expr)\n NodeId ast_node_id = expr.get_fnexpr ().get_mappings ().get_nodeid ();\n NodeId ref_node_id;\n \n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n-\n- if (auto id = nr_ctx.lookup (ast_node_id))\n-\tref_node_id = *id;\n- else\n-\treturn;\n- }\n- // We don't care about types here\n- else if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))\n+ if (auto id = resolver.lookup (ast_node_id))\n+ ref_node_id = *id;\n+ else\n return;\n \n if (auto definition_id = mappings.lookup_node_to_hir (ref_node_id))\ndiff --git a/gcc/rust/checks/errors/rust-const-checker.h b/gcc/rust/checks/errors/rust-const-checker.h\nindex 0eea3880f..dfdeb7ba0 100644\n--- a/gcc/rust/checks/errors/rust-const-checker.h\n+++ b/gcc/rust/checks/errors/rust-const-checker.h\n@@ -22,7 +22,7 @@\n #include \"rust-hir-visitor.h\"\n #include \"rust-hir-type-check.h\"\n #include \"rust-stacked-contexts.h\"\n-#include \"rust-name-resolver.h\"\n+#include \"rust-name-resolution-context.h\"\n \n namespace Rust {\n namespace HIR {\n@@ -72,7 +72,7 @@ private:\n std::vector<std::unique_ptr<GenericParam>> ¶m, ConstGenericCtx context);\n \n StackedContexts<HirId> const_context;\n- Resolver::Resolver &resolver;\n+ const Resolver2_0::NameResolutionContext &resolver;\n Analysis::Mappings &mappings;\n \n virtual void visit (Lifetime &lifetime) override;\ndiff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc b/gcc/rust/checks/errors/rust-unsafe-checker.cc\nindex bf311384e..e9305efc1 100644\n--- a/gcc/rust/checks/errors/rust-unsafe-checker.cc\n+++ b/gcc/rust/checks/errors/rust-unsafe-checker.cc\n@@ -26,15 +26,12 @@\n #include \"rust-immutable-name-resolution-context.h\"\n #include \"rust-intrinsic-values.h\"\n \n-// for flag_name_resolution_2_0\n-#include \"options.h\"\n-\n namespace Rust {\n namespace HIR {\n \n UnsafeChecker::UnsafeChecker ()\n : context (*Resolver::TypeCheckContext::get ()),\n- resolver (*Resolver::Resolver::get ()),\n+ resolver (Resolver2_0::ImmutableNameResolutionContext::get ().resolver ()),\n mappings (Analysis::Mappings::get ())\n {}\n \n@@ -223,23 +220,10 @@ UnsafeChecker::visit (PathInExpression &path)\n NodeId ast_node_id = path.get_mappings ().get_nodeid ();\n NodeId ref_node_id;\n \n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n-\n- auto resolved = nr_ctx.lookup (ast_node_id);\n-\n- if (!resolved.has_value ())\n-\treturn;\n-\n- ref_node_id = resolved.value ();\n- }\n+ if (auto resolved = resolver.lookup (ast_node_id))\n+ ref_node_id = resolved.value ();\n else\n- {\n- if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))\n-\treturn;\n- }\n+ return;\n \n if (auto definition_id = mappings.lookup_node_to_hir (ref_node_id))\n {\n@@ -437,26 +421,10 @@ UnsafeChecker::visit (CallExpr &expr)\n NodeId ast_node_id = expr.get_fnexpr ().get_mappings ().get_nodeid ();\n NodeId ref_node_id;\n \n- // There are no unsafe types, and functions are defined in the name resolver.\n- // If we can't find the name, then we're dealing with a type and should return\n- // early.\n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n-\n- auto resolved = nr_ctx.lookup (ast_node_id);\n-\n- if (!resolved.has_value ())\n-\treturn;\n-\n- ref_node_id = resolved.value ();\n- }\n+ if (auto resolved = resolver.lookup (ast_node_id))\n+ ref_node_id = resolved.value ();\n else\n- {\n- if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))\n-\treturn;\n- }\n+ return;\n \n if (auto definition_id = mappings.lookup_node_to_hir (ref_node_id))\n {\ndiff --git a/gcc/rust/checks/errors/rust-unsafe-checker.h b/gcc/rust/checks/errors/rust-unsafe-checker.h\nindex fd1417089..bf345879d 100644\n--- a/gcc/rust/checks/errors/rust-unsafe-checker.h\n+++ b/gcc/rust/checks/errors/rust-unsafe-checker.h\n@@ -20,7 +20,7 @@\n #define RUST_UNSAFE_CHECKER_H\n \n #include \"rust-hir-visitor.h\"\n-#include \"rust-name-resolver.h\"\n+#include \"rust-name-resolution-context.h\"\n #include \"rust-hir-type-check.h\"\n #include \"rust-stacked-contexts.h\"\n \n@@ -54,7 +54,7 @@ private:\n StackedContexts<HirId> unsafe_context;\n \n Resolver::TypeCheckContext &context;\n- Resolver::Resolver &resolver;\n+ const Resolver2_0::NameResolutionContext &resolver;\n Analysis::Mappings &mappings;\n \n virtual void visit (Lifetime &lifetime) override;\ndiff --git a/gcc/rust/checks/lints/rust-lint-marklive.cc b/gcc/rust/checks/lints/rust-lint-marklive.cc\nindex f033d57a1..5e15d5dc3 100644\n--- a/gcc/rust/checks/lints/rust-lint-marklive.cc\n+++ b/gcc/rust/checks/lints/rust-lint-marklive.cc\n@@ -163,21 +163,10 @@ MarkLive::visit_path_segment (HIR::PathExprSegment seg)\n //\n // We should mark them alive all and ignoring other kind of segments.\n // If the segment we dont care then just return false is fine\n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n-\n- if (auto id = nr_ctx.lookup (ast_node_id))\n-\tref_node_id = *id;\n- else\n-\treturn false;\n- }\n- else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))\n- {\n- if (!resolver->lookup_resolved_type (ast_node_id, &ref_node_id))\n-\treturn false;\n- }\n+ if (auto id = resolver.lookup (ast_node_id))\n+ ref_node_id = *id;\n+ else\n+ return false;\n if (auto hid = mappings.lookup_node_to_hir (ref_node_id))\n {\n mark_hir_id (*hid);\n@@ -250,21 +239,13 @@ MarkLive::visit (HIR::TupleIndexExpr &expr)\n void\n MarkLive::visit (HIR::TypeAlias &alias)\n {\n- NodeId ast_node_id = UNKNOWN_NODEID;\n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n+ NodeId ast_node_id;\n \n- if (auto id = nr_ctx.lookup (\n-\t alias.get_type_aliased ().get_mappings ().get_nodeid ()))\n-\tast_node_id = *id;\n- }\n+ if (auto id = resolver.lookup (\n+\talias.get_type_aliased ().get_mappings ().get_nodeid ()))\n+ ast_node_id = *id;\n else\n- {\n- resolver->lookup_resolved_type (\n-\talias.get_type_aliased ().get_mappings ().get_nodeid (), &ast_node_id);\n- }\n+ rust_unreachable ();\n \n if (auto hid = mappings.lookup_node_to_hir (ast_node_id))\n mark_hir_id (*hid);\n@@ -285,27 +266,9 @@ MarkLive::mark_hir_id (HirId id)\n void\n MarkLive::find_ref_node_id (NodeId ast_node_id, NodeId &ref_node_id)\n {\n- if (flag_name_resolution_2_0)\n- {\n- auto &nr_ctx\n-\t= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();\n-\n- nr_ctx.lookup (ast_node_id).map ([&ref_node_id] (NodeId resolved) {\n-\tref_node_id = resolved;\n- });\n- }\n- else\n- {\n- if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))\n-\t{\n-\t if (!resolver->lookup_resolved_type (ast_node_id, &ref_node_id))\n-\t {\n-\t bool ok\n-\t\t= resolver->lookup_resolved_misc (ast_node_id, &ref_node_id);\n-\t rust_assert (ok);\n-\t }\n-\t}\n- }\n+ auto resolved = resolver.lookup (ast_node_id);\n+ rust_assert (resolved.has_value ());\n+ ref_node_id = resolved.value ();\n }\n \n } // namespace Analysis\ndiff --git a/gcc/rust/checks/lints/rust-lint-marklive.h b/gcc/rust/checks/lints/rust-lint-marklive.h\nindex 939d52ec4..253c26cfa 100644\n--- a/gcc/rust/checks/lints/rust-lint-marklive.h\n+++ b/gcc/rust/checks/lints/rust-lint-marklive.h\n@@ -23,6 +23,7 @@\n #include \"rust-hir-map.h\"\n #include \"rust-lint-marklive-base.h\"\n #include \"rust-name-resolver.h\"\n+#include \"rust-immutable-name-resolution-context.h\"\n \n namespace Rust {\n namespace Analysis {\n@@ -277,11 +278,12 @@ private:\n std::set<HirId> liveSymbols;\n std::set<HirId> scannedSymbols;\n Analysis::Mappings &mappings;\n- Resolver::Resolver *resolver;\n+ const Resolver2_0::NameResolutionContext &resolver;\n Resolver::TypeCheckContext *tyctx;\n MarkLive (std::vector<HirId> worklist)\n : worklist (worklist), mappings (Analysis::Mappings::get ()),\n- resolver (Resolver::Resolver::get ()),\n+ resolver (\n+\tResolver2_0::ImmutableNameResolutionContext::get ().resolver ()),\n tyctx (Resolver::TypeCheckContext::get ()){};\n \n void mark_hir_id (HirId);\n", "prefixes": [ "gccrs", "COMMIT" ] }