get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223302,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223302/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-33-arthur.cohen@embecosm.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260414231905.191063-33-arthur.cohen@embecosm.com>",
    "date": "2026-04-14T23:18:54",
    "name": "[COMMITTED,33/43] gccrs: Reject `default` functions after parsing.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6f174831418e809c5e0521375d2dd69cb31a4d54",
    "submitter": {
        "id": 83476,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/83476/?format=api",
        "name": "Arthur Cohen",
        "email": "arthur.cohen@embecosm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-33-arthur.cohen@embecosm.com/mbox/",
    "series": [
        {
            "id": 499900,
            "url": "http://patchwork.ozlabs.org/api/1.1/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/2223302/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223302/checks/",
    "tags": {},
    "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=aVtvhZbl;\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=aVtvhZbl",
            "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.65"
        ],
        "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 4fwL9k1cXVz1yHc\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 09:30:33 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 4ADC14BA23D7\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 23:30:31 +0000 (GMT)",
            "from mail-wm1-f65.google.com (mail-wm1-f65.google.com\n [209.85.128.65])\n by sourceware.org (Postfix) with ESMTPS id 868434BA2E23\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 23:15:01 +0000 (GMT)",
            "by mail-wm1-f65.google.com with SMTP id\n 5b1f17b1804b1-4852a9c6309so58220135e9.0\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 16:15:01 -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.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 16:14:58 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 4ADC14BA23D7",
            "OpenDKIM Filter v2.11.0 sourceware.org 868434BA2E23"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 868434BA2E23",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 868434BA2E23",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776208501; cv=none;\n b=lt//BNeLZzNlhoRyHc9rRPjKwRMC9xmSTh9vPvFEoQ1rIrjdMxbqBVRsdCknscilJrONgno16eTnJVbjlB/WjU9Jdz73QxQNL+XP1E2b3sN4r1XBhUAM4Lt5D3JTfWSjiROfgOI6gySXn7EPoAeeOBF3isjUOyc9lM/UQshXtUk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776208501; c=relaxed/simple;\n bh=XX6VQ24BUs00B6MMfzZB4wWsC747SGUAdPy/WxHxpWU=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=NAugr6HxrGfQBrF5+tzsTpmJVq875UB2Makj0IUWBjDcrZCTCkDTTNynHUJeLP7cdg93hJZS3ojg1KgZlp7wz/SqueKoo/P6O3W2e9DPdX+F1yF3D1Bxt80JQOoV9ugAwUNBJvpI8/DElajx3uCUSNB3E+34vcEALpzuf2qbRBk=",
        "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=1776208500; x=1776813300; 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=KWRArN1pRcScgO9+NldkdgLcm3wbLHyBCoTBu76/QG8=;\n b=aVtvhZblacN497Iy3HYvGW2A8kl9JHz5l+J7NKFYsPmXtr3W/JHnXoThiIYtHJZfpx\n DSGsJDqA1z2/DUJVJD2eKkcCTiUHqXukkmE5XZq/GsVoqAbH1lMEjmMD5UOIGxEa1kUo\n K7uQkoIUzSw/350zqzJTV5FEEBQAFb5Q5l2TI19O30YrHIIQxU1nSdadDar3JVgKvlPW\n A1mazIwdghdqwicf5prpUAztFs8MO0I7Brc2+M0dqDel+Uocj8DQyI9SZ8+QMAK87W1Z\n xAyWGN7Kn4PevJrbQTuI3Gjd+VTo4X2q6KVn3c1++p/whTtFu2x+Zd6TUIpXBCvefZY6\n 5IAg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776208500; x=1776813300;\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=KWRArN1pRcScgO9+NldkdgLcm3wbLHyBCoTBu76/QG8=;\n b=ASHedRdqXXFGeD6Dtl+4TfSAoBxXSP40wwQBquiiYA57khB31csyWT+rdI6It5UvkA\n pEzKpumx+Kgs9EdF2AyrkLFEh4KvZK7Jb0tad3DUL3vrrBgF4XjSmhZKGhFIHrpt5TJL\n cJgflYVJWwJ7NAZtyWpk+iRzwLtbF4+GmyH/Iq0qneugOG8lwA39+q9iPqx0NVfRAvzk\n 8iY3N92zaIhN2OJZIRBYHDyhHQdkqoh8Wj7bpd2V25Eq0GAunC802yZiLS07PrgRk3+A\n vNdazIfwcjo+M6jKOXPd1sy2x0sA5zIpfqUAl0LyvEHMy6VKblCnDWCh66gemLW6JkGF\n Zfxg==",
        "X-Gm-Message-State": "AOJu0YyLuyVlz93XFi9TYRxsBjtLsxvQo9ToLnHk0XWDSoVH4KYyheGC\n gsIHTU7TXZ1fWojcCiz6Ty+KiL7QXfMgGnFz1tkeB5lJ8CZcm+Qv33g/YzZl+0f6i2FSR9wFpye\n vdQ4VSRev",
        "X-Gm-Gg": "AeBDiet8NxZz3713gyv8bqAMCAH3KkjJPXQWGO8doTKUhExfOw7yEnmYFEme0nm8VMs\n VC4nVApSvQTP/qRx4CjVOpf1thOjqGtAQR7jkwr+wgOsvwQsZ+j5s9/+RsQtOerKH23vz3B87dl\n syW3WeDI519rPIMSAGGh68/IvA3p6Kq5Wd0cNm4gBXkutVPh1tDIUdcaEeAjqpX3svCnL6l0BGu\n mlHTcYDU3yGmfhchuf7gGfYZ5yAQsMSjRJRxzBK+RBFcUzYKz1acWlc8N+aypXrNuDoNP43HxCG\n IBWLjxPHPguoxkmOM8EMI03Vk01zOU0h3U3OAWrlYjdkK1Re9ZvDJ9nMxqvP2eJhVKHjeRMlhuH\n i6CA0axIYTcS3vaw4K04pXFT5bwCB+GplryNYS/Qm3UlEFjS3L5qulC4K1aUZ98EUxV25IqTzLS\n cZ5k37a6FOAtcnYMtYVoqgEF53YbIceMBgYhIL46uYN2yTNBbtFXFxJhEMB1eX1uMNl0CWS154c\n J51UQ==",
        "X-Received": "by 2002:a05:600c:3b0e:b0:487:20ee:bef6 with SMTP id\n 5b1f17b1804b1-488d67e65fdmr267909025e9.11.1776208500053;\n Tue, 14 Apr 2026 16:15:00 -0700 (PDT)",
        "From": "arthur.cohen@embecosm.com",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "gcc-rust@gcc.gnu.org,\n\tKushal Pal <kushalpal109@gmail.com>",
        "Subject": "[COMMITTED 33/43] gccrs: Reject `default` functions after parsing.",
        "Date": "Wed, 15 Apr 2026 01:18:54 +0200",
        "Message-ID": "<20260414231905.191063-33-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: Kushal Pal <kushalpal109@gmail.com>\n\nFunctions with `default` qualifier outside of `impl` blocks should be\nallowed to parse successfully and are later rejected during the\nASTValidation pass.\n\ngcc/rust/ChangeLog:\n\n\t* checks/errors/rust-ast-validation.cc (ASTValidation::visit):\n\tAdd error for functions with `default` qualifier outside of impl\n\tblocks.\n\t* parse/rust-parse-impl.hxx (Parser::parse_item):\n\tAllow parsing of functions with `default` qualifier.\n\t(Parser::parse_vis_item): Likewise.\n\nSigned-off-by: Kushal Pal <kushalpal109@gmail.com>\n---\n gcc/rust/checks/errors/rust-ast-validation.cc |  5 +++++\n gcc/rust/parse/rust-parse-impl.hxx            | 14 ++++++++------\n 2 files changed, 13 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/gcc/rust/checks/errors/rust-ast-validation.cc b/gcc/rust/checks/errors/rust-ast-validation.cc\nindex 00a49b6dada..52831e26eb1 100644\n--- a/gcc/rust/checks/errors/rust-ast-validation.cc\n+++ b/gcc/rust/checks/errors/rust-ast-validation.cc\n@@ -77,6 +77,11 @@ void\n ASTValidation::visit (AST::Function &function)\n {\n   const auto &qualifiers = function.get_qualifiers ();\n+  if (qualifiers.is_default () && ctx.peek () != Kind::INHERENT_IMPL\n+      && ctx.peek () != Kind::TRAIT_IMPL)\n+    rust_error_at (\n+      function.get_locus (),\n+      \"%<default%> is only allowed on items within %<impl%> blocks\");\n   if (qualifiers.is_async () && qualifiers.is_const ())\n     rust_error_at (function.get_locus (),\n \t\t   \"functions cannot be both %<const%> and %<async%>\");\ndiff --git a/gcc/rust/parse/rust-parse-impl.hxx b/gcc/rust/parse/rust-parse-impl.hxx\nindex 8c60ac38245..8820e3555e0 100644\n--- a/gcc/rust/parse/rust-parse-impl.hxx\n+++ b/gcc/rust/parse/rust-parse-impl.hxx\n@@ -431,10 +431,9 @@ Parser<ManagedTokenSource>::parse_item (bool called_from_statement)\n       else if (t->get_str () == Values::WeakKeywords::DEFAULT\n \t       && lexer.peek_token (1)->get_id () != EXCLAM)\n \t{\n-\t  add_error (Error (t->get_locus (),\n-\t\t\t    \"%qs is only allowed on items within %qs blocks\",\n-\t\t\t    \"default\", \"impl\"));\n-\t  return Parse::Error::Item::make_malformed ();\n+\t  // parse normal functions with `default` qualifier\n+\t  // they will be rejected in ASTValidation pass\n+\t  return parse_vis_item (std::move (outer_attrs));\n \t}\n       else if (is_macro_rules_def (t))\n \t{\n@@ -547,10 +546,13 @@ Parser<ManagedTokenSource>::parse_vis_item (AST::AttrVec outer_attrs)\n \t  return parse_union (std::move (vis), std::move (outer_attrs));\n \t  // or should item switch go straight to parsing union?\n \t}\n-      else\n+      else if (t->get_str () == Values::WeakKeywords::DEFAULT)\n \t{\n-\t  break;\n+\t  // parse normal functions with `default` qualifier they will be\n+\t  // rejected in ASTValidation pass\n+\t  return parse_function (std::move (vis), std::move (outer_attrs));\n \t}\n+      break;\n     case CONST:\n       // lookahead to resolve syntactical production\n       t = lexer.peek_token (1);\n",
    "prefixes": [
        "COMMITTED",
        "33/43"
    ]
}