rust-lang / rust-lang/rust

rustdoc shows a non-public path for rustc_target::callconv::PassMode

Open
#137,209 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-cross-crate-reexports A-rustdoc-search C-bug E-needs-mcve T-rustdoc T-rustdoc-frontend
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

To reproduce, visit https://doc.rust-lang.org/nightly/nightly-rustc/?search=PassMode. The main PassMode type used all over the compiler is shown as rustc_codegen_llvm::abi::PassMode. That is quite misleading since it makes it look like the type is specific to the LLVM codegen backend, when it is not! rustdoc should instead pick the path in rustc_target and show that.

It seems to me this changed recently. I am fairly sure I searched for PassMode before and it never used rustc_codegen_llvm as the canonical path. Not sure if it is rustdoc that changed or the rustc crate organization.

Cc @rust-lang/rustdoc @workingjubilee

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.

Research direction

Reproduce the result at the nightly rustdoc search URL for PassMode, then inspect how rustdoc selects canonical paths between rustc_target and rustc_codegen_llvm. Done means the shared type is presented under its rustc_target path rather than the LLVM-specific path, with coverage for the corrected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.