aboutsummaryrefslogtreecommitdiffstats
path: root/rust/macros/lib.rs
diff options
context:
space:
mode:
authorEthan D. Twardy <[email protected]>2024-07-04 14:55:42 +0000
committerMiguel Ojeda <[email protected]>2024-11-01 21:02:03 +0000
commitb2c261fa8629dff2bd1143fa790797a773ace102 (patch)
tree582a0e2eb3179919f86cd1a353e52367c39d8813 /rust/macros/lib.rs
parentrust: types: extend `Opaque` documentation (diff)
downloadkernel-b2c261fa8629dff2bd1143fa790797a773ace102.tar.gz
kernel-b2c261fa8629dff2bd1143fa790797a773ace102.zip
rust: kbuild: expand rusttest target for macros
Previously, the rusttest target for the macros crate did not specify the dependencies necessary to run the rustdoc tests. These tests rely on the kernel crate, so add the dependencies. Signed-off-by: Ethan D. Twardy <[email protected]> Link: https://github.com/Rust-for-Linux/linux/issues/1076 Link: https://lore.kernel.org/r/[email protected] [ Rebased (`alloc` is gone nowadays, sysroot handling is simpler) and simplified (reused `rustdoc_test` rule instead of adding a new one, no need for `rustdoc-compiler_builtins`, removed unneeded `macros` explicit path). Made `vtable` example fail (avoiding to increase the complexity in the `rusttest` target). Removed unstable `-Zproc-macro-backtrace` option. Reworded accordingly. - Miguel ] 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 939ae00b723a..b16402a16acd 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -132,7 +132,7 @@ pub fn module(ts: TokenStream) -> TokenStream {
/// calls to this function at compile time:
///
/// ```compile_fail
-/// # use kernel::error::VTABLE_DEFAULT_ERROR;
+/// # // Intentionally missing `use`s to simplify `rusttest`.
/// kernel::build_error(VTABLE_DEFAULT_ERROR)
/// ```
///