linux/rust/macros
Gary Guo e9a35442ef rust: kunit: use line!() inside kunit_assert!
The `diff` parameter is needed currently because doctests want to override
the line number. Simplify it by changing it to use `line!()`. Have doctests
override `line!()` macro to achieve the current behavior.

An existing doctest requires `line!()` to expand to a literal; so update
it to use `::core::line!()` instead.

Reviewed-by: David Gow <david@davidgow.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260902-kunit-v2-2-eda3ed6c00c5@garyguo.net
[ Removed spurious `///`-to-`//` change and adjusted `line!` to match.
  Added a comment to match `file!`'s. Made `NOTE:` more precise. Reworded
  to say it is only one doctest being updated. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-10-03 14:04:56 +02:00
..
concat_idents.rs rust: macros: convert concat_idents! to use syn 2026-01-28 00:55:25 +01:00
export.rs rust: macros: convert #[export] to use syn 2026-01-28 00:55:25 +01:00
fmt.rs Rust changes for v6.20 / v7.0 2026-02-10 11:53:01 -08:00
for_lt.rs rust: types: introduce ForLt base trait for CovariantForLt 2026-07-11 19:42:03 +02:00
helpers.rs rust: kunit: use file!() inside kunit_assert! 2026-10-03 14:04:56 +02:00
kunit.rs rust: kunit: use line!() inside kunit_assert! 2026-10-03 14:04:56 +02:00
lib.rs rust: kunit: use file!() inside kunit_assert! 2026-10-03 14:04:56 +02:00
module.rs rust: macros: allow non-ASCII characters in authors 2026-10-01 21:19:43 +02:00
paste.rs rust: macros: use quote! from vendored crate 2026-01-28 00:55:24 +01:00
vtable.rs rust: macros: vtable: add #[optional] attribute 2026-10-02 21:05:01 +02:00