On Mon, Nov 10, 2025 at 12:35:28PM +0100, Miguel Ojeda wrote:
> This example can easily be made buildable, thus do so.
> 
> It would have triggered an `unreachable_pub` warning without the previous
> commit.
> 
> Signed-off-by: Miguel Ojeda <[email protected]>

Reviewed-by: Alice Ryhl <[email protected]>

>  rust/kernel/device.rs | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
> index a849b7dde2fd..d00f4af507db 100644
> --- a/rust/kernel/device.rs
> +++ b/rust/kernel/device.rs
> @@ -67,7 +67,16 @@
>  ///
>  /// A bus specific device should be defined as follows.
>  ///
> -/// ```ignore
> +/// ```
> +/// # use core::marker::PhantomData;
> +/// # use kernel::{
> +/// #     device,
> +/// #     types::Opaque, //
> +/// # };
> +/// # mod bindings {
> +/// #     #[expect(non_camel_case_types)]
> +/// #     pub struct bus_device_type;
> +/// # }
>  /// #[repr(transparent)]
>  /// pub struct Device<Ctx: device::DeviceContext = device::Normal>(
>  ///     Opaque<bindings::bus_device_type>,
> -- 
> 2.51.2
> 

Reply via email to