Skip to content

Commit b53d561

Browse files
committed
rust: kernel: start using doc_cfg and doc
As an example, use `doc(cfg(...))` and `cfg(doc)` to gate `sysctl`. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent faf7ea6 commit b53d561

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/kernel/lib.rs

+2-1
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))]
68+
#[doc(cfg(CONFIG_SYSCTL))]
6869
pub mod sysctl;
6970

7071
pub mod io_buffer;

0 commit comments

Comments
 (0)