Re: [PATCH] rust: slice: fix broken intra-doc links

From: Alexandre Courbot

Date: Wed Nov 19 2025 - 20:56:37 EST


On Thu Nov 20, 2025 at 3:51 AM JST, Miguel Ojeda wrote:
> In older versions of Rust, the compiler doesn't know about the newer
> `as_flattened*` methods, thus `rustdoc` complains about the intra-doc
> links, e.g.
>
> error: unresolved link to `slice::as_flattened`
> --> rust/kernel/slice.rs:19:23
> |
> 19 | /// [`as_flattened`]: slice::as_flattened
> | ^^^^^^^^^^^^^^^^^^^ the primitive type `slice` has no associated item named `as_flattened`
> |
> = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
> = help: to override `-D warnings` add `#[allow(rustdoc::broken_intra_doc_links)]`
>
> Thus fix them by using an URL instead.
>
> Fixes: 88622323dde3 ("rust: enable slice_flatten feature and provide it through an extension trait")
> Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
> ---
> I have seen this in -next -- please feel free to take it or rebase if
> preferred etc., of course. Thanks!

Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

Alice, I guess we will want to take this into drm-rust-next or
drm-rust-fixes since that's where the patch introducing this originates
from?