Skip to content

Commit 61758fd

Browse files
committed
rust: kernel: start using doc_cfg and doc_all
As an example, use `doc_cfg` and `doc_all` to gate `sysctl`. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 3e2a3b1 commit 61758fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/kernel/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ pub mod random;
6464
mod static_assert;
6565
pub mod sync;
6666

67-
#[cfg(CONFIG_SYSCTL)]
67+
#[cfg(any(CONFIG_SYSCTL, doc_all))]
68+
#[doc(cfg(CONFIG_SYSCTL))]
6869
pub mod sysctl;
6970

7071
pub mod io_buffer;

0 commit comments

Comments
 (0)