]> git.ipfire.org Git - thirdparty/linux.git/commit
rust: macros: use `quote!` from vendored crate
authorGary Guo <gary@garyguo.net>
Mon, 12 Jan 2026 17:07:13 +0000 (17:07 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 27 Jan 2026 23:55:24 +0000 (00:55 +0100)
commitf637bafe1ff15fa356c1e0576c32f077b9e6e46a
treef2b480213a7369069560bbad196cd6441d1a380b
parent99ba0fa10de0cc0386ea61e6e5068a78a8394060
rust: macros: use `quote!` from vendored crate

With `quote` crate now vendored in the kernel, we can remove our custom
`quote!` macro implementation and just rely on that crate instead.

The `quote` crate uses types from the `proc-macro2` library so we also
update to use that, and perform conversion in the top-level lib.rs.

Clippy complains about unnecessary `.to_string()` as `proc-macro2`
provides additional `PartialEq` impl, so they are removed.

Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Gary Guo <gary@garyguo.net>
Acked-by: David Gow <davidgow@google.com> # for kunit
Link: https://patch.msgid.link/20260112170919.1888584-3-gary@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/macros/concat_idents.rs
rust/macros/export.rs
rust/macros/fmt.rs
rust/macros/helpers.rs
rust/macros/kunit.rs
rust/macros/lib.rs
rust/macros/module.rs
rust/macros/paste.rs
rust/macros/quote.rs [deleted file]
rust/macros/vtable.rs