get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2223281/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2223281,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2223281/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-15-arthur.cohen@embecosm.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260414231905.191063-15-arthur.cohen@embecosm.com>",
    "list_archive_url": null,
    "date": "2026-04-14T23:18:36",
    "name": "[COMMITTED,15/43] gccrs: nr1.0: Remove support in checking phases",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "bb054ac40c25453c5ad70c117f86d8f746db50dd",
    "submitter": {
        "id": 83476,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/83476/?format=api",
        "name": "Arthur Cohen",
        "email": "arthur.cohen@embecosm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-15-arthur.cohen@embecosm.com/mbox/",
    "series": [
        {
            "id": 499900,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499900/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499900",
            "date": "2026-04-14T23:18:24",
            "name": "[COMMITTED,01/43] gccrs: testsuite:Add a testcase for setup_associated_types",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499900/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223281/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223281/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=embecosm.com header.i=@embecosm.com header.a=rsa-sha256\n header.s=google header.b=MxitSXDj;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::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=embecosm.com header.i=@embecosm.com header.a=rsa-sha256\n header.s=google header.b=MxitSXDj",
            "sourceware.org;\n dmarc=none (p=none dis=none) header.from=embecosm.com",
            "sourceware.org; spf=pass smtp.mailfrom=embecosm.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.128.50"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::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 4fwKyd0S5cz1yHM\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 09:20:57 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 4656F4BA23DE\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 23:20:55 +0000 (GMT)",
            "from mail-wm1-f50.google.com (mail-wm1-f50.google.com\n [209.85.128.50])\n by sourceware.org (Postfix) with ESMTPS id 81E534BA9006\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 23:14:31 +0000 (GMT)",
            "by mail-wm1-f50.google.com with SMTP id\n 5b1f17b1804b1-488ba6366a7so75541145e9.0\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 16:14:31 -0700 (PDT)",
            "from platypus.localdomain (176-147-231-59.abo.bbox.fr.\n [176.147.231.59]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488f1dd8806sm3325945e9.3.2026.04.14.16.14.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 16:14:28 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 4656F4BA23DE",
            "OpenDKIM Filter v2.11.0 sourceware.org 81E534BA9006"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 81E534BA9006",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 81E534BA9006",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776208471; cv=none;\n b=kGA+pWPsp9WJUTwd1hEZOWAFfhGYyYjF/AClLFfzlJnyKe/wzvSg1K4W347odCMVbGUMiDawhuCaC86dll26cYXSgwyoWrB6xUM5xk+Qnf5HrlgsulPvEmMGrstFH148b443Lz/LA68kili6UK6eMYjnBHWT07m76CmJmy0GIWQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776208471; c=relaxed/simple;\n bh=Cyojc60ypOUdxHF973A2NlLW96UVJ0zuInk7NrnaYx4=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=G53vLD2Gfio3Ap+vRlw9u+2XkRXuNByRH3tk8Ks74cJwl1+k1+O+pJXRMxm5OAW0qoxLF7rGHkVQAiumuOBzfR1gxKd5ruS+4aeWaDPfXKuUTGFih3NPeBMInWYFHmhIejDst7nLLxhQraw3qKV/2wf/BGBBlpiqIOqhyA0HXWQ=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=embecosm.com; s=google; t=1776208470; x=1776813270; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=27jvLcYk4g/9AO4Rfp+gSTtAi0pr+/oQUOsY/CYaKIQ=;\n b=MxitSXDjP82/bFWWpUygQ5HsBpp5zf7/TLeX1OBuZdhEfbL7di4XEx+BmC938nS+jD\n 7GLwFlL8rBTaMtpWDsUwOljS0XqlwHBdospcxIUjYra/XGFKx240wJdv4oAPUhyL2Xsq\n ePh6DLW+CWxC1UcYhMw17cc/V7LHNbNP6LdSWRfekZCvOAjI6EGmj/FUEip4icrW1yus\n uGayWNiuAx3mmJLqersn8+5cJq1VI/LRNeBTUR6DLGXuHqQya+AthPakpzyuZDgvWkde\n D5xVVvFc0XuDnXnVEG20DnpiqpauyLcNw07Ig8RlnZWrZsiL+cc8V3VkqLHsK3I74VA6\n eDVA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776208470; x=1776813270;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=27jvLcYk4g/9AO4Rfp+gSTtAi0pr+/oQUOsY/CYaKIQ=;\n b=qjQMV+vdXQCTcrqCeE9XZt8EThZNhJ3vwTRU8bV7P7++eRqWiSa70Fy1WEDUV9MUUe\n gI9Dd/27u1z3Fwqk3vX92HeZjydxSMPWPkYuLgpegYCuPsYUUV7bD5f+ySrB0GtHY23D\n rrwHbpCSEvabwxk5evzQRvGck08UtBd2h6SpI9KbBYAfBdqx+XiQqg8y6gz1SyZrwmHq\n us+v2vyy7k/GMkbGSXIdYjSheyxbP9kzK4gfhyHd3xgqqO3N33pGdRPD6tLgskTmLC24\n +amiIiDFBFWX/eGkDgwIkEJXxIM2WwdhfcjFvhze1g0qUvSXq7ONvY5p0LgKlUzt1JhH\n Ia/g==",
        "X-Gm-Message-State": "AOJu0Yw8miX5eNYUj2OzXahV2Aas7fw1ZlvGa5rnFx3FWfuATAQA2SCZ\n y5ThkUyFTqgqbbWeQDIoaHG8m3HtYN5SHg5pG1K9DgIMUcezKdLf66egg8g5CmpOb3MLE0BNON9\n nXkZTig==",
        "X-Gm-Gg": "AeBDiesytG8G/7Ab3TSj2Ci957dRcGL9jUXQCcEBb+Xk+3uj+pvaLCYqEDGRHz9Rk/0\n 1ffAqgA9dqAceWTCdWasfpYWm1Ncr1X++PytyhyaWfH42I2OTCDB1mMBnokIwDmeGUciU/nqg0H\n q6eoCP9vBhtzCtHvLfk2ikEq5hOm6FkLQRdYrj4WwymJipaZFt6u3LnBsQHGWPJlGBSg6LHau4g\n MR4E7w5j3J13ZCbaEgs6tpi0Tu5CJhwMzwXlI1qb3rdjEsSKJ8K16tM0rQvclUBLnvtvG4bs1nT\n NYQGz4db4UVegBw6FUMHc5Rbhz8CFSYiKLJtAIyMTz7UlWb519/H1GGNJGXXK6MDBq9Nj5j7PDO\n g3H0Zdl7OnD3Oq8xjovzaGGOPH/WWQJniurk1yAsTSd74kCqpBtCxTxpPlMD1xLlap0o88iqEEj\n aOByDmDqWQQVCvihiH4ze6rGb5t+r8rsbVQB5doFnX72tt290MkVeZ1XyC+vrwo7nx4W4/7tqTq\n 5y2KA==",
        "X-Received": "by 2002:a05:600c:c08e:b0:488:9619:9bf4 with SMTP id\n 5b1f17b1804b1-488d686093bmr183457585e9.20.1776208470088;\n Tue, 14 Apr 2026 16:14:30 -0700 (PDT)",
        "From": "arthur.cohen@embecosm.com",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "gcc-rust@gcc.gnu.org,\n\tOwen Avery <powerboat9.gamer@gmail.com>",
        "Subject": "[COMMITTED 15/43] gccrs: nr1.0: Remove support in checking phases",
        "Date": "Wed, 15 Apr 2026 01:18:36 +0200",
        "Message-ID": "<20260414231905.191063-15-arthur.cohen@embecosm.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260414231905.191063-1-arthur.cohen@embecosm.com>",
        "References": "<20260414231905.191063-1-arthur.cohen@embecosm.com>",
        "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---\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(-)",
    "diff": "diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc\nindex 3e4e1912100..51ff2583f76 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 0eea3880f34..dfdeb7ba09d 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>> &param, 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 bf311384e74..e9305efc18d 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 fd141708919..bf345879d9d 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 f033d57a111..5e15d5dc3c5 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 939d52ec44b..253c26cfa7a 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": [
        "COMMITTED",
        "15/43"
    ]
}