]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: list: hide macros from top-level kernel doc
authorGary Guo <gary@garyguo.net>
Thu, 12 Mar 2026 17:46:59 +0000 (17:46 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 27 Mar 2026 11:15:47 +0000 (12:15 +0100)
commitd58f0f146a6e3fe3c6fcf6db1e0d385414bc8713
tree836ed14c051c22136eacb8b74827ae055fc37505
parent9bf32bc60cb2561f8e27fea2cb24c86d5ab99997
rust: list: hide macros from top-level kernel doc

Due to Rust macro scoping rules, all macros defined in a crate using
`#[macro_export]` end up in the top-level. For the list macros, we
re-export them inside the list module, and expect users to use
`kernel::list::macro_name!()`.

Use `#[doc(hidden)]` on the macro definition, and use `#[doc(inline)]` on
the re-export to make the macro appear to be defined at module-level inside
documentation.

The other exported types are already automatically `#[doc(inline)]` because
they are defined in a non-public module, so there is no need to split the
macro re-exports out.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260312174700.4016015-1-gary@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/list.rs
rust/kernel/list/arc.rs
rust/kernel/list/arc_field.rs
rust/kernel/list/impl_list_item_mod.rs