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

From: Alice Ryhl

Date: Thu Nov 20 2025 - 04:59:31 EST


On Thu, Nov 20, 2025 at 10:56:29AM +0900, Alexandre Courbot wrote:
> 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?

Yes, it goes in drm-rust-next:

After -rc6, the branch is open for fixing bugs introduced by
patches queued up in drm-rust-next for the upcoming merge window
only.

I will take the patch.

Alice