get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218014,
    "url": "http://patchwork.ozlabs.org/api/patches/2218014/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260331094037.3408-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": "<20260331094037.3408-1-gerris.rs@gmail.com>",
    "list_archive_url": null,
    "date": "2026-03-31T09:40:27",
    "name": "[gccrs,COMMIT,01/10] Remove AttrInputMacro attribute input kind",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6f051b2dd2d94fd13556aca1cb0a0a5a6d13d1a8",
    "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/20260331094037.3408-1-gerris.rs@gmail.com/mbox/",
    "series": [
        {
            "id": 498158,
            "url": "http://patchwork.ozlabs.org/api/series/498158/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498158",
            "date": "2026-03-31T09:40:27",
            "name": "[gccrs,COMMIT,01/10] Remove AttrInputMacro attribute input kind",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498158/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218014/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218014/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=jovdR1vw;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=temperror (SPF Temporary Error: DNS Timeout) 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=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=jovdR1vw",
            "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.174"
        ],
        "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 4flNSK160Vz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 20:41:49 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 2BDB24BA2E29\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 09:41:47 +0000 (GMT)",
            "from mail-dy1-f174.google.com (mail-dy1-f174.google.com\n [74.125.82.174])\n by sourceware.org (Postfix) with ESMTPS id 7539D4BA2E29\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 09:40:40 +0000 (GMT)",
            "by mail-dy1-f174.google.com with SMTP id\n 5a478bee46e88-2ba895adfeaso5837956eec.0\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 02:40:40 -0700 (PDT)",
            "from\n runnervmrg6be.i0fnop2thlderixbsj2qpy22md.yx.internal.cloudapp.net\n ([57.151.128.242]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2c3c796d895sm9175510eec.28.2026.03.31.02.40.38\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 02:40:38 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 2BDB24BA2E29",
            "OpenDKIM Filter v2.11.0 sourceware.org 7539D4BA2E29"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 7539D4BA2E29",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 7539D4BA2E29",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774950040; cv=none;\n b=np3j8LPADyUMW8brUNg1leYpbcFf3Kwz2xZkXjTYT3rD4Xu3b2cmKjArLwqRN2MHLrHOlpZbf5e/FveZRUyECCiqyd/sNeuZTn7cNoSqUrZokOw3tCe71FLIl+adh6J1jJJPiQI8wRS57xmi9CUO0LFdX9MuVUG8zZfNh172JzI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774950040; c=relaxed/simple;\n bh=T0Ocw38yr3JNUAztEIG+zFwZR1/sCF9qJ7HJnpX9BOY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=RdlHLzYyAl3D67trvWlympJ90pGgipV5h2BJcjKcBGM8lMiTGr4XtTouecW9fzQ2OGfDGV6FvtZ4zXCbbqGcIW5e4yx1oxXHd3PiLKnVgsAK7KdspewPqAzce9lRo9/iCeuPDt+RAwebbEB2f+23pbON7Sg2UUEs0PXFtuI52Qo=",
        "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=1774950039; x=1775554839; 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=uOORpCR6vMNpFJacyFqaFAszvLDvmCEuSk6LHJhfx5Y=;\n b=jovdR1vwACoRlNiLRO7uBZKhKf6o/1j65KtkNwvBCXFEBT8rEQJ4keGP7xUtzsAyzh\n Ul0xY2VqaXNp3OrH8zKnj32cVVR2qkmZ3zWq6cJwL8Vv/fhNf7TwsVCAUotsJU7cGqIL\n HlfYyEGT2FBajFK+qDaFpAsALNEyJhDSnfH/2ePuk1Ogv1QwdrZQvvKJl8MDda8z4w07\n vE17Eh0GAbruMV1TY1lyN/HtosJp+t5JJXji4zE90GbgSS1Afmq8OkG6AAD//YyLTINs\n wkI9g1pTPAbLRXUKzKnURATyJlnR+LW+qg1xmCnhPiMwJh6uBHMO+I9cuJrej0WiD0NI\n 1WqA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774950039; x=1775554839;\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=uOORpCR6vMNpFJacyFqaFAszvLDvmCEuSk6LHJhfx5Y=;\n b=mjPS7cARItBqdSKB9j8fjAavG2a9mLSDpvgEdKu35aUCXkPBkEsLAjiynY6ET78F3X\n YjJaxRoZa0cyYgi+ekP/5j/DJD7DAlvr/dPEd3ct9Jhqct/oc69BLI04bsHayfShbzup\n O8Mo1WCNbSFCF1jQQ+Oxp+ohAFje99V4Yg77nAYW1FU2z4SThlxUPHUCmjbUuGYwsj7y\n v96SADjmZJnqNlywqpY4k0sTBueIAWoQeL0z+SOWUN3A2y8imyXoregKJs5HhYvEbNXS\n 6//sfW508Z/sEGNd2cWACQgFgTjIT1MNmw7xWHi/tT+6R8MfIDDnnpCuwSFnwq6Zn9Rj\n hXFw==",
        "X-Gm-Message-State": "AOJu0YwDnvIOOQ8ORECu6k4gyvf1LgQTPNO4EGW+wpUEa25815PRR1XR\n O0dEx5JL9RmnRFaUBNfnPV3r44H+YVjRg3NSe93kChhoYuYX1IfC8RjB5NzIew==",
        "X-Gm-Gg": "ATEYQzw3HZUMQP8PqEb7D+aeMjkSwpYbeBiTQvxWOrsyt4spNyLboA84gKN+M8PNYrL\n b5VBoc4VGpN7KuBFMSMMQ/kV/Rimdnve9kkSCA/fmnCtTJxJd4/FIjx6dwH8maK5ZY+e7MI+1z6\n 8KR+ZDEeSXrI5eFZezxhS+QiyLhDgNkbFk/xm1QHJwq9ZIiKIDC9K51QKyeTqov+8Xvyy7UtsT6\n NwIPQ0Xzk/FTnxNDAZ3KnLuZw8no9z49HHWZSKxCX9e8vzJnyZ7gfcQAdYqpaB5jZXMXE4Z1KgX\n ccdKSoT/RqyYUMbHWCXxOoHVL1SlEsbY5KgZaScGzDGqV+b0sRFZdw6JDyMQGsIXr3JrePPBlx9\n p8EyHZ0sGGY0Gp9wJb5umxLVMjxsRQAjUdMNlw+xM8o9y4XTAkrdk5Cw5pfyV4WigSbNfWao3NC\n kxxVVqsyjbcwP5fe3wiu9B9agbMBKBc2zIpfTCvVCX6HM1icspY6/iW8JqGcfaOv/jaLmjNdgjO\n pztnoWW60ROPiQtNA+LPyI=",
        "X-Received": "by 2002:a05:7301:5504:b0:2c8:717:7ec7 with SMTP id\n 5a478bee46e88-2c8071782f7mr685082eec.20.1774950039168;\n Tue, 31 Mar 2026 02:40:39 -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",
        "Subject": "[gccrs COMMIT 01/10] Remove AttrInputMacro attribute input kind",
        "Date": "Tue, 31 Mar 2026 09:40:27 +0000",
        "Message-ID": "<20260331094037.3408-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: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>\n\nThis attribute kind is being replaced with AttrInputExpr attributes.\n\ngcc/rust/ChangeLog:\n\n\t* ast/rust-ast-collector.cc (TokenCollector::visit): Remove\n\tAttrInputMacro handling.\n\t* ast/rust-ast-collector.h: Remove function prototype.\n\t* ast/rust-ast-full-decls.h (class AttrInputMacro): Remove forward\n\tdeclaration.\n\t* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Remove function.\n\t* ast/rust-ast-visitor.h: Remove function prototypes.\n\t* ast/rust-ast.cc (Attribute::get_traits_to_derive): Remove handling of\n\tmacros.\n\t(AttrInputMacro::as_string): Remove function.\n\t(AttrInputMacro::AttrInputMacro): Likewise.\n\t(AttrInputMacro::operator=): Likewise.\n\t(AttrInputMacro::accept_vis): Likewise.\n\t* ast/rust-ast.h: Remove MACRO kind.\n\t* ast/rust-expr.h (class AttrInputMacro): Add getter for expr pointer.\n\tRemove AttrInputMacro class.\n\t* expand/rust-derive.h: Remove function prototype.\n\t* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Change function\n\tto AttrInputExpr.\n\t* expand/rust-expand-visitor.h: Update prototype.\n\t* hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Remove function.\n\t* hir/rust-ast-lower-base.h: Remove function prototype.\n\t* parse/rust-parse-impl-attribute.hxx: Parse the attribute content as\n\tAttrInputExpr instead.\n\t* util/rust-attributes.cc (check_doc_attribute): Remove MACRO kind\n\thandling.\n\t(check_export_name_attribute): Remove switch and only handle literals.\n\t(AttributeChecker::visit): Remove function.\n\t* util/rust-attributes.h: Remove function prototype.\n\nSigned-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.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/526fbed59165bcd8d4715a2b735aa0768d2f48cd\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4505\n\n gcc/rust/ast/rust-ast-collector.cc           | 14 ------\n gcc/rust/ast/rust-ast-collector.h            |  1 -\n gcc/rust/ast/rust-ast-full-decls.h           |  1 -\n gcc/rust/ast/rust-ast-visitor.cc             |  6 ---\n gcc/rust/ast/rust-ast-visitor.h              |  2 -\n gcc/rust/ast/rust-ast.cc                     | 26 -----------\n gcc/rust/ast/rust-ast.h                      |  1 -\n gcc/rust/ast/rust-expr.h                     | 48 +-------------------\n gcc/rust/expand/rust-derive.h                |  1 -\n gcc/rust/expand/rust-expand-visitor.cc       |  4 +-\n gcc/rust/expand/rust-expand-visitor.h        |  2 +-\n gcc/rust/hir/rust-ast-lower-base.cc          |  3 --\n gcc/rust/hir/rust-ast-lower-base.h           |  1 -\n gcc/rust/parse/rust-parse-impl-attribute.hxx |  3 +-\n gcc/rust/util/rust-attributes.cc             | 45 ++++++------------\n gcc/rust/util/rust-attributes.h              |  1 -\n 16 files changed, 20 insertions(+), 139 deletions(-)\n\n\nbase-commit: 593fb1594a708a200a5129ff1191f7fede04d3c2",
    "diff": "diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc\nindex ba4b8aa0b..e6072a80b 100644\n--- a/gcc/rust/ast/rust-ast-collector.cc\n+++ b/gcc/rust/ast/rust-ast-collector.cc\n@@ -176,11 +176,6 @@ TokenCollector::visit (Attribute &attrib)\n \t\tstatic_cast<AttrInputLiteral &> (attrib.get_attr_input ()));\n \t      break;\n \t    }\n-\t  case AST::AttrInput::AttrInputType::MACRO:\n-\t    {\n-\t      visit (static_cast<AttrInputMacro &> (attrib.get_attr_input ()));\n-\t      break;\n-\t    }\n \t  case AST::AttrInput::AttrInputType::EXPR:\n \t    {\n \t      visit (static_cast<AttrInputExpr &> (attrib.get_attr_input ()));\n@@ -903,15 +898,6 @@ TokenCollector::visit (AttrInputLiteral &literal)\n   });\n }\n \n-void\n-TokenCollector::visit (AttrInputMacro &macro)\n-{\n-  describe_node (std::string (\"AttrInputMacro\"), [this, &macro] () {\n-    push (Rust::Token::make (EQUAL, UNDEF_LOCATION));\n-    visit (macro.get_macro ());\n-  });\n-}\n-\n void\n TokenCollector::visit (AttrInputExpr &attr)\n {\ndiff --git a/gcc/rust/ast/rust-ast-collector.h b/gcc/rust/ast/rust-ast-collector.h\nindex af60e9d1f..6f03f5758 100644\n--- a/gcc/rust/ast/rust-ast-collector.h\n+++ b/gcc/rust/ast/rust-ast-collector.h\n@@ -291,7 +291,6 @@ public:\n   // rust-expr.h\n   void visit (LiteralExpr &expr);\n   void visit (AttrInputLiteral &attr_input);\n-  void visit (AttrInputMacro &attr_input);\n   void visit (AttrInputExpr &attr_input);\n   void visit (MetaItemLitExpr &meta_item);\n   void visit (MetaItemPathExpr &meta_item);\ndiff --git a/gcc/rust/ast/rust-ast-full-decls.h b/gcc/rust/ast/rust-ast-full-decls.h\nindex f90b93145..21bb686d4 100644\n--- a/gcc/rust/ast/rust-ast-full-decls.h\n+++ b/gcc/rust/ast/rust-ast-full-decls.h\n@@ -77,7 +77,6 @@ class QualifiedPathInType;\n class ExprWithBlock;\n class LiteralExpr;\n class AttrInputLiteral;\n-class AttrInputMacro;\n class MetaItemLitExpr;\n class MetaItemPathExpr;\n class OperatorExpr;\ndiff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc\nindex 66054c7af..f7d33ffc4 100644\n--- a/gcc/rust/ast/rust-ast-visitor.cc\n+++ b/gcc/rust/ast/rust-ast-visitor.cc\n@@ -208,12 +208,6 @@ DefaultASTVisitor::visit (AST::AttrInputLiteral &attr_input)\n   visit (attr_input.get_literal ());\n }\n \n-void\n-DefaultASTVisitor::visit (AST::AttrInputMacro &attr_input)\n-{\n-  visit (attr_input.get_macro ());\n-}\n-\n void\n DefaultASTVisitor::visit (AST::AttrInputExpr &attr_input)\n {\ndiff --git a/gcc/rust/ast/rust-ast-visitor.h b/gcc/rust/ast/rust-ast-visitor.h\nindex 0ad69a453..c3ec4362b 100644\n--- a/gcc/rust/ast/rust-ast-visitor.h\n+++ b/gcc/rust/ast/rust-ast-visitor.h\n@@ -72,7 +72,6 @@ public:\n   // rust-expr.h\n   virtual void visit (LiteralExpr &expr) = 0;\n   virtual void visit (AttrInputLiteral &attr_input) = 0;\n-  virtual void visit (AttrInputMacro &attr_input) = 0;\n   virtual void visit (AttrInputExpr &attr_input) = 0;\n   virtual void visit (MetaItemLitExpr &meta_item) = 0;\n   virtual void visit (MetaItemPathExpr &meta_item) = 0;\n@@ -270,7 +269,6 @@ public:\n   virtual void visit (AST::LiteralExpr &expr) override;\n   virtual void visit (AST::AttrInputLiteral &attr_input) override;\n   virtual void visit (AST::AttrInputExpr &attr_input) override;\n-  virtual void visit (AST::AttrInputMacro &attr_input) override;\n   virtual void visit (AST::MetaItemLitExpr &meta_item) override;\n   virtual void visit (AST::MetaItemPathExpr &meta_item) override;\n   virtual void visit (AST::BorrowExpr &expr) override;\ndiff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc\nindex 004e27603..e8897696a 100644\n--- a/gcc/rust/ast/rust-ast.cc\n+++ b/gcc/rust/ast/rust-ast.cc\n@@ -344,7 +344,6 @@ Attribute::get_traits_to_derive ()\n       break;\n     case AST::AttrInput::TOKEN_TREE:\n     case AST::AttrInput::LITERAL:\n-    case AST::AttrInput::MACRO:\n     case AST::AttrInput::EXPR:\n       rust_unreachable ();\n       break;\n@@ -3377,12 +3376,6 @@ AttrInputExpr::accept_vis (ASTVisitor &vis)\n   vis.visit (*this);\n }\n \n-std::string\n-AttrInputMacro::as_string () const\n-{\n-  return \" = \" + macro->as_string ();\n-}\n-\n /* Override that calls the function recursively on all items contained within\n  * the module. */\n void\n@@ -4314,19 +4307,6 @@ BlockExpr::normalize_tail_expr ()\n     }\n }\n \n-// needed here because \"rust-expr.h\" doesn't include \"rust-macro.h\"\n-AttrInputMacro::AttrInputMacro (const AttrInputMacro &oth)\n-  : macro (oth.macro->clone_macro_invocation_impl ())\n-{}\n-\n-AttrInputMacro &\n-AttrInputMacro::operator= (const AttrInputMacro &oth)\n-{\n-  macro = std::unique_ptr<MacroInvocation> (\n-    oth.macro->clone_macro_invocation_impl ());\n-  return *this;\n-}\n-\n /* Visitor implementations - these are short but inlining can't happen anyway\n  * due to virtual functions and I didn't want to make the ast header includes\n  * any longer than they already are. */\n@@ -4373,12 +4353,6 @@ AttrInputLiteral::accept_vis (ASTVisitor &vis)\n   vis.visit (*this);\n }\n \n-void\n-AttrInputMacro::accept_vis (ASTVisitor &vis)\n-{\n-  vis.visit (*this);\n-}\n-\n void\n MetaItemLitExpr::accept_vis (ASTVisitor &vis)\n {\ndiff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h\nindex b82a8cbd7..4a1974d4d 100644\n--- a/gcc/rust/ast/rust-ast.h\n+++ b/gcc/rust/ast/rust-ast.h\n@@ -726,7 +726,6 @@ public:\n   {\n     EXPR,\n     LITERAL,\n-    MACRO,\n     META_ITEM,\n     TOKEN_TREE,\n   };\ndiff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h\nindex 1ea5c3a30..90e4daec4 100644\n--- a/gcc/rust/ast/rust-expr.h\n+++ b/gcc/rust/ast/rust-expr.h\n@@ -204,58 +204,14 @@ public:\n \n   Expr &get_expr () { return *expr; }\n \n+  std::unique_ptr<Expr> &get_expr_ptr () { return expr; }\n+\n   AttrInputExpr *clone_attr_input_impl () const override\n   {\n     return new AttrInputExpr (*this);\n   }\n };\n \n-// Like an AttrInputLiteral, but stores a MacroInvocation\n-class AttrInputMacro : public AttrInput\n-{\n-  std::unique_ptr<MacroInvocation> macro;\n-\n-public:\n-  AttrInputMacro (std::unique_ptr<MacroInvocation> macro)\n-    : macro (std::move (macro))\n-  {}\n-\n-  AttrInputMacro (const AttrInputMacro &oth);\n-\n-  AttrInputMacro (AttrInputMacro &&oth) : macro (std::move (oth.macro)) {}\n-\n-  AttrInputMacro &operator= (const AttrInputMacro &oth);\n-\n-  AttrInputMacro &operator= (AttrInputMacro &&oth)\n-  {\n-    macro = std::move (oth.macro);\n-    return *this;\n-  }\n-\n-  std::string as_string () const override;\n-\n-  void accept_vis (ASTVisitor &vis) override;\n-\n-  // assuming this can't be a cfg predicate\n-  bool check_cfg_predicate (const Session &) const override { return false; }\n-\n-  // assuming this is like AttrInputLiteral\n-  bool is_meta_item () const override { return false; }\n-\n-  std::unique_ptr<MacroInvocation> &get_macro () { return macro; }\n-\n-  AttrInputType get_attr_input_type () const final override\n-  {\n-    return AttrInput::AttrInputType::MACRO;\n-  }\n-\n-protected:\n-  AttrInputMacro *clone_attr_input_impl () const override\n-  {\n-    return new AttrInputMacro (*this);\n-  }\n-};\n-\n /* literal expr only meta item inner - TODO possibly replace with inheritance of\n  * LiteralExpr itself? */\n class MetaItemLitExpr : public MetaItemInner\ndiff --git a/gcc/rust/expand/rust-derive.h b/gcc/rust/expand/rust-derive.h\nindex 1f0662ab2..7774c6bac 100644\n--- a/gcc/rust/expand/rust-derive.h\n+++ b/gcc/rust/expand/rust-derive.h\n@@ -104,7 +104,6 @@ private:\n   virtual void visit (Token &tok) override final{};\n   virtual void visit (DelimTokenTree &delim_tok_tree) override final{};\n   virtual void visit (AttrInputMetaItemContainer &input) override final{};\n-  virtual void visit (AttrInputMacro &expr) override final{};\n   virtual void visit (AttrInputExpr &expr) override final{};\n   virtual void visit (IdentifierExpr &ident_expr) override final{};\n   virtual void visit (Lifetime &lifetime) override final{};\ndiff --git a/gcc/rust/expand/rust-expand-visitor.cc b/gcc/rust/expand/rust-expand-visitor.cc\nindex 690c74bee..c124f9ab9 100644\n--- a/gcc/rust/expand/rust-expand-visitor.cc\n+++ b/gcc/rust/expand/rust-expand-visitor.cc\n@@ -584,9 +584,9 @@ ExpandVisitor::visit (AST::AttrInputLiteral &)\n {}\n \n void\n-ExpandVisitor::visit (AST::AttrInputMacro &macro)\n+ExpandVisitor::visit (AST::AttrInputExpr &attr_input)\n {\n-  rust_sorry_at (UNDEF_LOCATION, \"macros in attributes not supported\");\n+  reseat (attr_input.get_expr_ptr ());\n }\n \n void\ndiff --git a/gcc/rust/expand/rust-expand-visitor.h b/gcc/rust/expand/rust-expand-visitor.h\nindex 2a3938afe..d6e48e075 100644\n--- a/gcc/rust/expand/rust-expand-visitor.h\n+++ b/gcc/rust/expand/rust-expand-visitor.h\n@@ -231,7 +231,7 @@ public:\n \n   void visit (AST::LiteralExpr &expr) override;\n   void visit (AST::AttrInputLiteral &) override;\n-  void visit (AST::AttrInputMacro &) override;\n+  void visit (AST::AttrInputExpr &) override;\n   void visit (AST::MetaItemLitExpr &) override;\n   void visit (AST::MetaItemPathExpr &) override;\n   void visit (AST::StructExprStruct &expr) override;\ndiff --git a/gcc/rust/hir/rust-ast-lower-base.cc b/gcc/rust/hir/rust-ast-lower-base.cc\nindex 1fc73152a..8b2fa5a2f 100644\n--- a/gcc/rust/hir/rust-ast-lower-base.cc\n+++ b/gcc/rust/hir/rust-ast-lower-base.cc\n@@ -140,9 +140,6 @@ ASTLoweringBase::visit (AST::LiteralExpr &)\n void\n ASTLoweringBase::visit (AST::AttrInputLiteral &)\n {}\n-void\n-ASTLoweringBase::visit (AST::AttrInputMacro &)\n-{}\n \n void\n ASTLoweringBase::visit (AST::AttrInputExpr &)\ndiff --git a/gcc/rust/hir/rust-ast-lower-base.h b/gcc/rust/hir/rust-ast-lower-base.h\nindex 42675c281..ff1e51eb2 100644\n--- a/gcc/rust/hir/rust-ast-lower-base.h\n+++ b/gcc/rust/hir/rust-ast-lower-base.h\n@@ -106,7 +106,6 @@ public:\n   virtual void visit (AST::LiteralExpr &expr) override;\n   virtual void visit (AST::AttrInputLiteral &attr_input) override;\n   virtual void visit (AST::AttrInputExpr &attr_input) override;\n-  virtual void visit (AST::AttrInputMacro &attr_input) override;\n   virtual void visit (AST::MetaItemLitExpr &meta_item) override;\n   virtual void visit (AST::MetaItemPathExpr &meta_item) override;\n   virtual void visit (AST::BorrowExpr &expr) override;\ndiff --git a/gcc/rust/parse/rust-parse-impl-attribute.hxx b/gcc/rust/parse/rust-parse-impl-attribute.hxx\nindex 5c7bd99bf..3db1cd5c6 100644\n--- a/gcc/rust/parse/rust-parse-impl-attribute.hxx\n+++ b/gcc/rust/parse/rust-parse-impl-attribute.hxx\n@@ -314,8 +314,7 @@ Parser<ManagedTokenSource>::parse_attr_input ()\n \t    if (!invoke)\n \t      return Parse::Error::AttrInput::make_bad_macro_invocation ();\n \n-\t    return std::unique_ptr<AST::AttrInput> (\n-\t      new AST::AttrInputMacro (std::move (invoke)));\n+\t    return std::make_unique<AST::AttrInputExpr> (std::move (invoke));\n \t  }\n \n \tAST::Literal::LitType lit_type = AST::Literal::STRING;\ndiff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc\nindex 7c137d06b..3b6587ffd 100644\n--- a/gcc/rust/util/rust-attributes.cc\n+++ b/gcc/rust/util/rust-attributes.cc\n@@ -271,7 +271,6 @@ check_doc_attribute (const AST::Attribute &attribute)\n   switch (attribute.get_attr_input ().get_attr_input_type ())\n     {\n     case AST::AttrInput::LITERAL:\n-    case AST::AttrInput::MACRO:\n     case AST::AttrInput::META_ITEM:\n     case AST::AttrInput::EXPR:\n       break;\n@@ -507,38 +506,26 @@ check_export_name_attribute (const AST::Attribute &attribute)\n       return;\n     }\n \n-  // We don't support the whole extended_key_value_attributes feature, we only\n-  // support a subset for macros. We need to emit an error message when the\n-  // attribute does not contain a macro or a string literal.\n   if (attribute.has_attr_input ())\n     {\n       auto &attr_input = attribute.get_attr_input ();\n-      switch (attr_input.get_attr_input_type ())\n+      if (attr_input.get_attr_input_type ()\n+\t  == AST::AttrInput::AttrInputType::LITERAL)\n \t{\n-\tcase AST::AttrInput::AttrInputType::LITERAL:\n-\t  {\n-\t    auto &literal_expr\n-\t      = static_cast<AST::AttrInputLiteral &> (attr_input)\n-\t\t  .get_literal ();\n-\t    auto lit_type = literal_expr.get_lit_type ();\n-\t    switch (lit_type)\n-\t      {\n-\t      case AST::Literal::LitType::STRING:\n-\t      case AST::Literal::LitType::RAW_STRING:\n-\t      case AST::Literal::LitType::BYTE_STRING:\n-\t\treturn;\n-\t      default:\n-\t\tbreak;\n-\t      }\n-\t    break;\n-\t  }\n-\tcase AST::AttrInput::AttrInputType::MACRO:\n-\t  return;\n-\tdefault:\n-\t  break;\n+\t  auto &literal_expr\n+\t    = static_cast<AST::AttrInputLiteral &> (attr_input).get_literal ();\n+\t  auto lit_type = literal_expr.get_lit_type ();\n+\t  switch (lit_type)\n+\t    {\n+\t    case AST::Literal::LitType::STRING:\n+\t    case AST::Literal::LitType::RAW_STRING:\n+\t    case AST::Literal::LitType::BYTE_STRING:\n+\t      return;\n+\t    default:\n+\t      break;\n+\t    }\n \t}\n     }\n-  rust_error_at (attribute.get_locus (), \"attribute must be a string literal\");\n }\n \n static void\n@@ -642,10 +629,6 @@ void\n AttributeChecker::visit (AST::AttrInputLiteral &)\n {}\n \n-void\n-AttributeChecker::visit (AST::AttrInputMacro &)\n-{}\n-\n void\n AttributeChecker::visit (AST::MetaItemLitExpr &)\n {}\ndiff --git a/gcc/rust/util/rust-attributes.h b/gcc/rust/util/rust-attributes.h\nindex f63f90236..4bac82012 100644\n--- a/gcc/rust/util/rust-attributes.h\n+++ b/gcc/rust/util/rust-attributes.h\n@@ -129,7 +129,6 @@ private:\n   // rust-expr.h\n   void visit (AST::LiteralExpr &expr) override;\n   void visit (AST::AttrInputLiteral &attr_input) override;\n-  void visit (AST::AttrInputMacro &attr_input) override;\n   void visit (AST::MetaItemLitExpr &meta_item) override;\n   void visit (AST::MetaItemPathExpr &meta_item) override;\n   void visit (AST::BorrowExpr &expr) override;\n",
    "prefixes": [
        "gccrs",
        "COMMIT",
        "01/10"
    ]
}