diff options
| author | Gary Guo <gary@garyguo.net> | 2026-09-02 23:00:00 +0100 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-10-03 14:04:56 +0200 |
| commit | e9a35442ef91f7f599a95e04928e80748fba2998 (patch) | |
| tree | 289ebab0252f0220416a9cc186ec966e3d52e98b /tools/lib/python | |
| parent | 3504d1bce9920b23499ab1af682cdf1eceba7c75 (diff) | |
| download | linux-next-e9a35442ef91f7f599a95e04928e80748fba2998.tar.gz linux-next-e9a35442ef91f7f599a95e04928e80748fba2998.zip | |
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>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
