diff options
author | Ethan D. Twardy <ethan.twardy@gmail.com> | 2024-07-04 09:55:44 -0500 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2024-11-01 22:02:53 +0100 |
commit | 7e06561fcd9636b6483c5fcd8fe935475f4944f8 (patch) | |
tree | d7da72455abd034411b96d050a0df1844f511269 /rust/helpers/workqueue.c | |
parent | 8d3f50795ac2857b0c2fd43558e078650d58d750 (diff) | |
download | linux-7e06561fcd9636b6483c5fcd8fe935475f4944f8.tar.gz linux-7e06561fcd9636b6483c5fcd8fe935475f4944f8.tar.bz2 linux-7e06561fcd9636b6483c5fcd8fe935475f4944f8.zip |
rust: macros: enable paste! use from macro_rules!
According to the rustdoc for the proc_macro crate[1], tokens captured
from a "macro variable" (e.g. from within macro_rules!) may be delimited
by invisible tokens and be contained within a proc_macro::Group.
Previously, this scenario was not handled by macros::paste, which caused
a proc-macro panic when the corresponding tests are enabled. Enable the
tests, and handle this case by making macros::paste::concat recursive.
Link: https://doc.rust-lang.org/stable/proc_macro/enum.Delimiter.html [1]
Signed-off-by: Ethan D. Twardy <ethan.twardy@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://github.com/Rust-for-Linux/linux/issues/1076
Link: https://lore.kernel.org/r/20240704145607.17732-4-ethan.twardy@gmail.com
[ Rebased (one fix was already applied) and reworded. Remove unneeded
`rust` as language in examples. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions