Commit 42055939 authored by Miguel Ojeda's avatar Miguel Ojeda Committed by Danilo Krummrich
Browse files

rust: devres: fix doctest build under `!CONFIG_PCI`



The doctest requires `CONFIG_PCI`:

    error[E0432]: unresolved import `kernel::pci`
        --> rust/doctests_kernel_generated.rs:2689:44
         |
    2689 | use kernel::{device::Core, devres::Devres, pci};
         |                                            ^^^ no `pci` in the root
         |
    note: found an item that was configured out
        --> rust/kernel/lib.rs:96:9
    note: the item is gated here
        --> rust/kernel/lib.rs:95:1

Thus conditionally compile it (which still checks the syntax).

Fixes: f301cb97 ("rust: devres: implement Devres::access()")
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/r/20250511182533.1016163-1-ojeda@kernel.org


Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
parent b75a99e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment