rust-lang / rust-lang/rust

rustdoc picks an odd "canonical" path for some often-reexported types

Open
#124,608 8 comments 1 reaction 1 assignee View on GitHub

@notriddle is already working on this.

Since May 2, 2024.

A-rustdoc-search T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

It seems that recently, rustdoc started to not show duplicate results for a type when it gets reexported. That is great! However, the name it decides to pick is sometimes odd.

Consider for instance InterpError: rustdoc shows this as miri::InterpError, which makes it look like a type defined in Miri. That's not the case though, the type is defined in rustc_middle. I would have expected this to be shown as rustc_middle::mir::interpret::InterpError -- that's the canonical path for this type, as far as I am concerned. Certainly it should be showing some rustc crate as otherwise one could easily think that this type is not available outside Miri.

Cc @rust-lang/rustdoc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.