rust-lang / rust-lang/rust

Local `rustc-docs` could make use of local pages for `std` types

Open
#151,496 8 comments 0 reactions 1 assignee View on GitHub

@arferreira is already working on this.

Since Feb 6, 2026.

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

Description

Posting this for @blyxyas and big thanks for having spotted this issue real quick :)

Location (URL)

The same problem persists in many different pages, just to pick an example on my machine:

$RUSTUP_HOME/toolchains/nightly-aarch64-apple-darwin/share/doc/rust/html/rustc-docs/rustc_trait_selection/errors/struct.AmbiguousImpl.html

Summary

The external link for Option<> is https://doc.rust-lang.org/nightly/core/option/enum.Option.html, which is probably desirable for online usage, but considering the fact that this download is intended for offline usage, it'd be better if it can point to the std docs just next to it, i.e. $RUSTUP_HOME/toolchains/nightly-aarch64-apple-darwin/share/doc/rust/html/std/option/enum.Option.html?

A few things to be noted for this issue:

  1. This issue should be resolved in a way that it doesn't break the online docs.

  2. This does imply an implicit dependency between rustc-docs and rust-docs which rustup is not quite ready to handle, but since rustc-docs is mostly for in-house usage, I believe we can focus on redirecting the links for the time being.

cc @GuillaumeGomez @jieyouxu

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.