aboutsummaryrefslogtreecommitdiffstats
path: root/rust/macros/lib.rs
diff options
context:
space:
mode:
authorMiguel Ojeda <[email protected]>2025-05-02 21:51:28 +0000
committerMiguel Ojeda <[email protected]>2025-05-27 18:09:59 +0000
commit897d1df6532f05814acd364af9055cd6628fd1b3 (patch)
tree024067ee6ab4dc112e3e098e82f2da2981eed477 /rust/macros/lib.rs
parentrust: kunit: support checked `-> Result`s in KUnit `#[test]`s (diff)
downloadkernel-897d1df6532f05814acd364af9055cd6628fd1b3.tar.gz
kernel-897d1df6532f05814acd364af9055cd6628fd1b3.zip
rust: add `kunit_tests` to the prelude
It is convenient to have certain things in the `kernel` prelude, and means kernel developers will find it even easier to start writing tests. And, anyway, nobody should need to use this identifier for anything else. Thus add it to the prelude. Reviewed-by: David Gow <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/macros/lib.rs')
-rw-r--r--rust/macros/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index bb5df3b730fc..fa847cf3a9b5 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -407,7 +407,7 @@ pub fn paste(input: TokenStream) -> TokenStream {
/// # Examples
///
/// ```ignore
-/// # use macros::kunit_tests;
+/// # use kernel::prelude::*;
/// #[kunit_tests(kunit_test_suit_name)]
/// mod tests {
/// #[test]