Skip to content

Rustdoc links items in the standard library to the original crate, not the re-export #78467

Closed as not planned
@Evian-Zhang

Description

@Evian-Zhang

In my docs, I use [`String`] or even [`std::string::String`], I expect the generated link is to the std page, but the generated link is to the alloc page.

I know maybe std re-exports some structs in alloc, core, etc. but for a beginner who does not know well about rust, he may be confused when clicking the link to String and get an unfamiliar path. So what can I do if I want to link to std page?

Meta

rustc --version --verbose:

rustc 1.49.0-nightly (a1dfd2490 2020-10-05)
binary: rustc
commit-hash: a1dfd2490a6cb456b92e469fa550dc217e20ad6d
commit-date: 2020-10-05
host: x86_64-unknown-linux-gnu
release: 1.49.0-nightly
LLVM version: 11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions