rust: macros: reduce collections in `quote!` macro
authorTamir Duberstein <tamird@gmail.com>
Wed, 13 Aug 2025 15:45:05 +0000 (11:45 -0400)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 22 Sep 2025 18:57:02 +0000 (20:57 +0200)
commit9578c3906c7d9a6f7c1ffefc73a4e8fc3452f336
tree46c9cc28fd69cb0fdda4aa3b2456d05e4f0e0a5b
parent657403637f7d343352efb29b53d9f92dcf86aebb
rust: macros: reduce collections in `quote!` macro

Remove a handful of unnecessary intermediate vectors and token streams;
mainly the top-level stream can be directly extended with the notable
exception of groups.

Remove an unnecessary `#[allow(dead_code)]` added in commit dbd5058ba60c
("rust: make pin-init its own crate").

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/macros/quote.rs