From: "Vincenzo Palazzo" <vincenzopalazzodev@gmail.com>
To: "Trevor Gross" <tmgross@umich.edu>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Wedson Almeida Filho" <wedsonaf@gmail.com>
Cc: "Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
"Alice Ryhl" <aliceryhl@google.com>,
"Martin Rodriguez Reboredo" <yakoyoku@gmail.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
"FUJITA Tomonori" <fujita.tomonori@gmail.com>
Subject: Re: [PATCH] rust: macros: update 'paste!' macro to accept string literals
Date: Mon, 09 Oct 2023 10:44:34 +0200 [thread overview]
Message-ID: <CW3RYK6CSPPU.3OJHLR8D4XUYN@gmail.com> (raw)
In-Reply-To: <20231008094816.320424-1-tmgross@umich.edu>
> This allows combining user-specified strings with affixes to create
> namespaced identifiers.
>
> This sample code:
>
> macro_rules! m {
> ($name:lit) => {
> 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 <fujita.tomonori@gmail.com>
> Signed-off-by: Trevor Gross <tmgross@umich.edu>
> ---
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
next prev parent reply other threads:[~2023-10-09 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 9:48 [PATCH] rust: macros: update 'paste!' macro to accept string literals Trevor Gross
2023-10-08 12:27 ` Martin Rodriguez Reboredo
2023-10-09 3:03 ` Trevor Gross
2023-10-09 10:49 ` Miguel Ojeda
2023-10-09 19:14 ` Trevor Gross
2023-10-12 20:45 ` Miguel Ojeda
2023-10-09 8:44 ` Vincenzo Palazzo [this message]
2023-10-09 10:02 ` Alice Ryhl
2023-10-09 14:51 ` Benno Lossin
2023-10-24 12:54 ` Gary Guo
2023-10-24 16:51 ` Boqun Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CW3RYK6CSPPU.3OJHLR8D4XUYN@gmail.com \
--to=vincenzopalazzodev@gmail.com \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=wedsonaf@gmail.com \
--cc=yakoyoku@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.