Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3075498rdh; Mon, 27 Nov 2023 06:08:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLUAJrrTDiJFEdTDQpRLE/y5pfJ85vpD9FVXqXoXJa4nwCgPBceakAhRG1gWN4H0L3PNFF X-Received: by 2002:a05:6830:22eb:b0:6b9:b1b0:fcd1 with SMTP id t11-20020a05683022eb00b006b9b1b0fcd1mr11783159otc.31.1701094087985; Mon, 27 Nov 2023 06:08:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701094087; cv=none; d=google.com; s=arc-20160816; b=c0wemoU2wFrXorcfRuqIfb+gsxJReWofo7RaOxL9R+BbfkCSx7L3eIASaRfUHA7JnF 3Ru2ZMKLJqgfXZ2hjppkemtbZLjgUi1yBA87UmwRW7n/vMh8/kwZxAzBf+2YPFJXMfHy yRvwSJQAEc5FhjgBSuqd7lTxtBPVH762/im4Crewi5jl/bj008+2mhz2Fe42uqBJsqDf WWk9CEKVurUBelnabKWJ9teK1BoxJDyC6DjKnHdd7q1GMiPrcpLINB6VyFstJGahS/I9 vfTrFBLm5dAHHL88MNZ1v75v4BFpRmqMcmJ47uBYkPBuU1CXJP5hvrBlJse+atsaXuVt mwCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IOw7FonKD9MbC43k524zBSSsF7xxQpwUCU29NYnvaYc=; fh=zA6WBwy0cNgTzEi6oGdZa7QYzKGaRoqHwpVG8nofWAo=; b=AMOclUm3gw2VzAD2C5Cw+AgfFxSWlk6OfXn9rDNGCPmeH+I4BOaB21TGPBZ94NQe90 1rFi7+trICW9WkHfjuQ7B0ffHH5NN92cLiJYBiIo2mtQsztWg9QmB3OsPm15K3pcTaoo k5NkUbNF3DDHVC/5/oVELI5B+Trl+QXXZP2oz0D4IF4n6gpY8XrNZUxuVih0pekaxwtd f0Wh/VW6F5pPCCTHIlZctmEtfGqcroNBUw1mDQVBkUaJdOEi7z37gXUwLg5cUtM+s7AI CUZHGDisNnbFMejYzBMPyat72//4aCZurnU07SXFR7/Fx09EGATJb1UEoTbmLpXSDQ1W 0kPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=OJl3mNIL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id s16-20020a05683004d000b006d7f816ae90si3578375otd.114.2023.11.27.06.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:08:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=OJl3mNIL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 6A52F805E467; Mon, 27 Nov 2023 06:08:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233702AbjK0OHv (ORCPT + 99 others); Mon, 27 Nov 2023 09:07:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233468AbjK0OFu (ORCPT ); Mon, 27 Nov 2023 09:05:50 -0500 Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB85819A4 for ; Mon, 27 Nov 2023 06:01:14 -0800 (PST) Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-58d564b98c9so1179161eaf.2 for ; Mon, 27 Nov 2023 06:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701093674; x=1701698474; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=IOw7FonKD9MbC43k524zBSSsF7xxQpwUCU29NYnvaYc=; b=OJl3mNILmZTiqrlV73fwESfHGqesPKULezY5YoR/hoWDnaKMpNhk3Tf34HBwaROh53 GcRQNkavgyhK9b3+098L8JGZ5gk1VGIVoceM2ya11oDvjHs8ML99oIHHvKZV6zt4ZE87 mHKGWuejAx+slrIJKQcrayqNUpy2NMQIt6kLohbEvCUTQuHf4YbKiVel/cKEHLM4N4YJ y1g5zPBP+mzfFDGIVseumrYEZLUHl47waAS3tAlCtFGN57KnOnjfH5j8TjY4If4PBpKN WbAqpr9D41bcpP+VC5rcojcdR4IGZIoMA4QaSqv3JY87R70OWeeb1cJPvOYXlnZXgp2F DUSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701093674; x=1701698474; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IOw7FonKD9MbC43k524zBSSsF7xxQpwUCU29NYnvaYc=; b=Q0Diayw7MYZ2JhdV8GLdHtrwAdC2dILps1DqoIQ8ZrrzG7i2UnfQkHEk12b5obElfh g6xreUYD6nqKWotb1hH6vO6iHgTMx/VHEkkMWxzi/tKckWiMt+7w4I+Ellz6BL6yzfet LmfHp/HA9pBs4wst/zyuisX3XvLTci9x7zpcXz8ZiX5uV/SmkNwXH4PSvL0tFoUQTp4z 8LEGoFct/fczb+/83+MezZPLqwrJWJnQdr89db2aIZtVJfpeQDujK9/WmYXEFwF4p1us y3S09zTBjk5N26DSDEKCqC+nKbJD8V9HakBPbFcyRSS/WTpk4K0TDCTfbV92pFHItU9f aqbw== X-Gm-Message-State: AOJu0Yyh9UF7HrNH/E7BNrsUFPjC26kDnAvzzU4qPMcgeCUdnFWoSZxI M6S+XpLMpPmDaW+ZmusD3JtZzVkyCjRziVogceS5Iw== X-Received: by 2002:a05:6358:4407:b0:16d:abc7:bfab with SMTP id z7-20020a056358440700b0016dabc7bfabmr13836740rwc.15.1701093674044; Mon, 27 Nov 2023 06:01:14 -0800 (PST) MIME-Version: 1.0 References: <20231118013959.37384-1-tmgross@umich.edu> In-Reply-To: <20231118013959.37384-1-tmgross@umich.edu> From: Alice Ryhl Date: Mon, 27 Nov 2023 15:01:03 +0100 Message-ID: Subject: Re: [PATCH v2] rust: macros: update 'paste!' macro to accept string literals To: Trevor Gross Cc: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Martin Rodriguez Reboredo , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, FUJITA Tomonori , Vincenzo Palazzo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:08:05 -0800 (PST) On Sat, Nov 18, 2023 at 2:41=E2=80=AFAM Trevor Gross wr= ote: > > Enable combining identifiers with literals in the 'paste!' macro. This > allows combining user-specified strings with affixes to create > namespaced identifiers. > > This sample code: > > macro_rules! m { > ($name:lit) =3D> { > paste!(struct [<_some_ $name _struct_>] {}) > } > } > > m!("foo_bar"); > > Would previously cause a compilation error. It will now generate: > > struct _some_foo_bar_struct_ {} > > Signed-off-by: Trevor Gross > Reviewed-by: Martin Rodriguez Reboredo > Reviewed-by: Vincenzo Palazzo > Reviewed-by: Alice Ryhl > Reviewed-by: Benno Lossin > Reviewed-by: Gary Guo Since there are no other replies to this version, I'll confirm that this still looks good to me. Alice