rust: macros: convert `#[kunit_tests]` macro to use `syn`
Make use of `syn` to parse the module structurally and thus improve the
robustness of parsing.
String interpolation is avoided by generating tokens directly using
`quote!`.
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Reviewed-by: David Gow <davidgow@google.com>
Link: https://patch.msgid.link/20260112170919.1888584-9-gary@kernel.org
[ Pass C string to match commit
6c37b6841a92 ("rust: kunit: replace
`kernel::c_str!` with C-Strings"). - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>