Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1759202rdb; Mon, 9 Oct 2023 01:45:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNSwQgtY9hdpM+QnrIf+eA6xWD9v3LEmWiPZcZdquAP4zI911QwahVcgQCfqhjH1njWDu9 X-Received: by 2002:a05:6a21:789c:b0:14b:8b82:867f with SMTP id bf28-20020a056a21789c00b0014b8b82867fmr14489247pzc.50.1696841101163; Mon, 09 Oct 2023 01:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696841101; cv=none; d=google.com; s=arc-20160816; b=dpxeUNydWcntJY7am6HzkVp1BGpOrMT4WW1I6rWvQoffCQZe6F0xsp20XRMc0Uc/sa Uu+xlIOO7fU+Ik1GBh+G5KQTpc6iUcZ5J47mgkz6o6DG8dKkwqwb97/+npw/wqTAqR5k W8NkLNxzR5zVDiXONs4ShV+Kv82SnMv42EpHbNhAzQAUux30ZN23zIqFe9hGxtfmqOA7 MOfQXqQSNUU2XklOfgttpXqARqXo0k2wzmdL1EJ58unogoEQ3T2Sh9urByF5MCNwjbTb +Wr+G7/0hzk/lkOI0RuMUEg4FsHXdUdeXGUwGchLoV6GhG7Qirnsci3NAC6poCbsj2Sq Cb8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:from:subject:cc:to :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=j9NcPuuexC4LQq676h0S9gZdLKWSig2GRtgLCV25zrQ=; fh=pOfVsLLF+RkO9G9vaGD7wjzeG3viNhFlBZSp9rXeN4o=; b=tetI3UtuRZ+hd/ylvzrOKGQwcUDjWW9fcXyekGb/AUqJfo25BRB9Cmwr/ExZul0EQE VIh2UL4WJ+pgD0xTgMPYT/vBL0YK/amT/1+RqHPwXrFOW7MTLjerh6zsmkehrCz7yLiZ ihGlHl1dkIp2aMZU8KeYJ7qT5h9UezB/HlFKoQzMrrTgl/Pe4IE2vNYi/WYQLRQp5tWf 1k7PYRq4eenRbLQuMf+JCMnCJIroFv3c80Bt7+b6l0JqbWg9DnaH26mo9UBebGMj5nZO Z4xX2jtMQPTVhjZfTpfi7HzB5XbABJEkkUCJX1wX9NAsQq544cZhSrTQsOtNRVjrhkIN B7lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ImNzueI9; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id fi35-20020a056a0039a300b006901504b68esi7086139pfb.166.2023.10.09.01.45.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 01:45:01 -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=@gmail.com header.s=20230601 header.b=ImNzueI9; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1DAAC80D144E; Mon, 9 Oct 2023 01:44:55 -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 S1345507AbjJIIop (ORCPT + 99 others); Mon, 9 Oct 2023 04:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345531AbjJIIom (ORCPT ); Mon, 9 Oct 2023 04:44:42 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B99E210A; Mon, 9 Oct 2023 01:44:38 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c15463ddd4so47480611fa.3; Mon, 09 Oct 2023 01:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696841077; x=1697445877; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=j9NcPuuexC4LQq676h0S9gZdLKWSig2GRtgLCV25zrQ=; b=ImNzueI9RmlEX1HFmru90JeCk1ow8JyJIQiG8wrvQTWui8m3+4JBq46l1PjZ3rhbRd 3Arxcvn6mhrqi1e0eNiFrJnS0hdFpPQYrwwUcvj1wGeRe+F9MJxW/H9ZPQh2ps+bPuB2 sXNITZfAzOoj67Hh24xU3JGqObAFDjHTTkiOE5zKP6RciUDDXJyppW4cHMaiXBfBavdS 0VvQLKY4hdq6cM73DWD4QxltfGhX6XVhae4EXb0LMgvCaF1zbBwqQj3UY12IgQfY/Q2I E+mydI5K9gPLMhOLdbkNMTu0rvpTOs5UKe1286hpI6eqafR79wuq6QxV/9sZZelfnPxU /JTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696841077; x=1697445877; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=j9NcPuuexC4LQq676h0S9gZdLKWSig2GRtgLCV25zrQ=; b=S6YNB/Ao4rmuqRYDm/eDAoOk9NlZqJhoM2nN9OhJP8vdnZzR2XpyfPFxzVuD7ABAu1 w4aU8c9z9j2lXQFhS5W9yTaGU+txIRQKh/yA6yMi5b07f/34WvlPt40b7Hec4bKyjQAi PbcWObdTrT1mwGMRmtm/s3SIlW2HDKk1jITcf7BlOVdHQHGKh8WOcYhsVs3GXRwTO8b/ bOVpftCxfxf/90wUbRzfby6U+tm3pD/AUP1yu5WhhV8rRpwMjH6Z0ftrDaz00/vZAztk Zlfv2azTVXJqgqyeUEhf+CSFFNLMGN1+FfJWH9jVbyyW6xW+rJhELSSVMVFMoYncli3T QNEA== X-Gm-Message-State: AOJu0YxMnHo4v5E1Vh+Fzb7HBo7RZlyAcVAYnpItvDy+vkKwD/813w5p o3BpQbvCavXen4uGrgoAS5c= X-Received: by 2002:a2e:9c88:0:b0:2bc:d7cb:8283 with SMTP id x8-20020a2e9c88000000b002bcd7cb8283mr12542249lji.40.1696841076658; Mon, 09 Oct 2023 01:44:36 -0700 (PDT) Received: from localhost ([146.70.182.19]) by smtp.gmail.com with ESMTPSA id q2-20020a2e9682000000b002b9ef00b10csm1990652lji.2.2023.10.09.01.44.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 01:44:36 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 09 Oct 2023 10:44:34 +0200 Message-Id: To: "Trevor Gross" , "Miguel Ojeda" , "Alex Gaynor" , "Wedson Almeida Filho" Cc: "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Martin Rodriguez Reboredo" , , , "FUJITA Tomonori" Subject: Re: [PATCH] rust: macros: update 'paste!' macro to accept string literals From: "Vincenzo Palazzo" X-Mailer: aerc 0.15.2-211-g37d5fc691aff References: <20231008094816.320424-1-tmgross@umich.edu> In-Reply-To: <20231008094816.320424-1-tmgross@umich.edu> X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS 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 01:44:55 -0700 (PDT) X-Spam-Level: ** > 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: Vincenzo Palazzo