On Thu, Sep 24, 2026 at 2:51 AM Gary Guo <[email protected]> wrote:
>
> From: Gary Guo <[email protected]>
>
> Currently rustdoc will generate function names like
> "_doctest_main__home_gary_Projects_linux_rust_kernel_io_rs_824_0" for a
> doctest located at rust/kernel/io.rs:824, when building with separate
> outdir using `O=`. This creates overlong symbol names and is also not
> reproducible.
>
> Fix it by doing a custom remapping to trim it to something like
> `_doctest_main_rust_kernel_io_rs_824_0`.
>
> Signed-off-by: Gary Guo <[email protected]>

Applied to `rust-next` -- thanks!

    [ `rustdoc` already remaps these paths when we use Rust >= 1.95, thus
      this fix is needed for older toolchains. - Miguel ]

    [ Added `TODO` comment about the minimum version bump. Reworded title
      and comment for typos. - Miguel ]

Cheers,
Miguel

Reply via email to