Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1788068rdb; Mon, 9 Oct 2023 03:02:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC1/czJXmSNejP4yQCdaf3hfx0Qc2kRyGJRUNzxKsUl62usDSi9FlLhI76ah/vZZViNWqh X-Received: by 2002:a05:6358:3994:b0:145:794e:ac30 with SMTP id b20-20020a056358399400b00145794eac30mr15000132rwe.17.1696845773815; Mon, 09 Oct 2023 03:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696845773; cv=none; d=google.com; s=arc-20160816; b=lq4BNiY3bjyl7QBVI+641WaZ59YMhKJvlrE1hRLHAkIO+6UIYRSCiaX6IQNV3iMRR0 3EMDXQRpuBx5ZkyX/fEkZDXXuF0rq98z/ogeAlXJ+PeFQdkrHmHZ6Wd2lCefZcQKv/7w ySWWquDh8RK1GNm6ezfbNFzQq9+x11DpsYQMDNI9aFi0QB7u4BCSnosDNSxuiPTjnteV TGOaTR1tSdVkGokc/55IQ/6DfgAaASLQVidPO012PReRRg1oTrszs6gGDsilFMMbxbv0 lryzK0gZh/kun2xe4vahy9J2NBaakjRhgbgDdI4qWRen7iUmGxPYNsjJInMSJB7wm1Cs +XXA== 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=TeHC4fUNzptIsm702Gc729/mLFYjfVybbm1yE9/t+ZU=; fh=SgbBEqBLX0uQcLx0OpuGaob/hnhdxs6CMxk/RKL/v1w=; b=IGk5GxiW3pMb1GqqxoFyqoCIeg6EYW7TRuAEJBouyLmrQXCnyybdVUxMYd+QnXW80o EJ/9bDiBqHQREyFQb/BLrajJSm0TflQiSNxQsZsV79DqtDp5ynOC51Kx6RzYAu9b6ArN HJE/19m4NCdKJB60ZInzCHO3dG+eYoDOO4BznLJm+sKImxg0tvmjTxIp/fBJLAc3Ujj9 QYeKBCuFS6wQQbofYloW9zXZzfFdcFOK3fcKBKco/an0nV+/FULOs4Kw9JuKCsdeZWC6 zrW7voWuqPccWsQLtVaBJNHGSnyqNCIfI757aIB8As7Fml8PSGIHZIjeFJgRht0tUfGi o/Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MrV3m5se; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s88-20020a17090a69e100b002764afcf7a1si11428924pjj.106.2023.10.09.03.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 03:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MrV3m5se; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 0221C8021E1D; Mon, 9 Oct 2023 03:02:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346010AbjJIKCm (ORCPT + 99 others); Mon, 9 Oct 2023 06:02:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345964AbjJIKCk (ORCPT ); Mon, 9 Oct 2023 06:02:40 -0400 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C45A99 for ; Mon, 9 Oct 2023 03:02:38 -0700 (PDT) Received: by mail-ua1-x92e.google.com with SMTP id a1e0cc1a2514c-7b07c3eaf9bso1322814241.3 for ; Mon, 09 Oct 2023 03:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696845757; x=1697450557; 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=TeHC4fUNzptIsm702Gc729/mLFYjfVybbm1yE9/t+ZU=; b=MrV3m5se8NFOytbLB9GHYXxM2dcxfeOftqIP63agQ/mHJuDCvtKYkiI1jmGNNBz4AW ageS6fInH34dctCeSNHRStHAY+aGDcFq2hfzuz3Jwm4Eq8ln7n5Up1ICOV5lSzajV+7z ztMo+O7eJR5B/6WbabN0F9/SUcb1v1NlrGx8Je9/pwe9edeOMeBKCa0VVvdRNLDkRpi7 i7L1X74yJfEAwNFRfmmDiXt8Aex3zm3tGKagodo/X4mgaSrDf+MGY97TIMjpKwi151DK pWnIEbO9a/KBE3uEr81uY/SonyTZH85HsPqi5ibIs5qpSMBcPvsmeWyvQtF0XBWVU/ec K3Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696845757; x=1697450557; 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=TeHC4fUNzptIsm702Gc729/mLFYjfVybbm1yE9/t+ZU=; b=L0Ar20HVQ02cNQRxiL/PW5btOo/2VEPo8z+Ucip8njHEb9sqgDmagCVMsnsuMoJd0u 4J/5LM8f/Y3gZ4Z69WSrAj6wInTSUFDHmAmUYAzY3yl3xGjxHundNsLsQu3F52yQucCN bXM2QYyc2iV1vEdUUADvirGGKrM9c77z3jyKEDn1o7WgGItzpO2ZUFGF6vzwQ32jklSC +3P1TimqY9bnZimA5DVezzzhNClsQApXXIqrvefBVwFe5Hs+kvG9DA74tmYW4kXLLIkZ aOlto6OU3rP5K0urBxZiumHA90wKyHYAv7tF5PDji+2vlzAKz1sA4s3tytTWAqbX9S8g 3sTA== X-Gm-Message-State: AOJu0YyfvTzFjsXOYIX2jzY6nvgGjxOUZ+MvjSGGwl1bplhtphtYaVRw 5UxTJWUcpljkgl0WfCq3Sj6oGvvMrVNpRmDfF7eLvA== X-Received: by 2002:a05:6102:3558:b0:454:6891:a53b with SMTP id e24-20020a056102355800b004546891a53bmr13033111vss.13.1696845757062; Mon, 09 Oct 2023 03:02:37 -0700 (PDT) MIME-Version: 1.0 References: <20231008094816.320424-1-tmgross@umich.edu> In-Reply-To: <20231008094816.320424-1-tmgross@umich.edu> From: Alice Ryhl Date: Mon, 9 Oct 2023 12:02:26 +0200 Message-ID: Subject: Re: [PATCH] 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 03:02:51 -0700 (PDT) On Sun, Oct 8, 2023 at 11:51=E2=80=AFAM Trevor Gross wr= ote: > Enable combining identifiers with string 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_; > > Reported-by: FUJITA Tomonori > Signed-off-by: Trevor Gross Reviewed-by: Alice Ryhl