linux/rust/kernel/sync
Gary Guo 8d49d90fb9 rust: make build_assert module the home of related macros
Given the macro scoping rules, all macros are rendered twice, in the
module and in the top-level of kernel crate.

Add `#[doc(hidden)]` to the macro definition and `#[doc(inline)]` to the
re-export inside `build_assert` module so the top-level items are hidden.

[ Sadly, because the definition is hidden, `rustdoc` decides to not list
  them as re-exports in the `prelude` page anymore, even if we refer to
  the not-actually-hidden item.

    - Miguel ]

Acked-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Acked-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260609142637.373347-1-gary@kernel.org
[ Kept a single declaration in the prelude, and reworded since they
  already had `no_inline`. Removed other imports from `predefine` since
  we now use the prelude. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2026-06-10 09:07:13 +02:00
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
lock rust: sync: add #[must_use] to GlobalGuard and GlobalLock::try_lock 2026-06-04 22:22:33 +02:00
arc.rs rust: sync: add UniqueArc::as_ptr 2026-06-09 04:13:21 +02:00
aref.rs rust: aref: use the "kernel vertical" imports style 2026-06-10 09:07:13 +02:00
atomic.rs rust: sync: atomic: Update documentation for fetch_add() 2026-03-08 11:06:51 +01:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs rust: completion: implement initial abstraction 2025-06-13 23:46:56 +02:00
condvar.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
lock.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
locked_by.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
poll.rs Scheduler updates for v6.17: 2025-07-29 17:42:52 -07:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00
refcount.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
set_once.rs rust: sync: set_once: Implement Send and Sync 2026-01-09 19:01:40 +08:00