Skip to content

[intra-doc-links] primitives inconsistently point offline or online in std docs #79630

Closed
@jnqnfe

Description

@jnqnfe

I noticed with an offline copy of the Rust 1.47 docs from the package in the Debian Sid repo, that there is an undesirable inconsistency in where links to primitives point to within the std documentation.

Take for instance the documentation for the std::ffi::CStr::to_string_lossy() method, which I just happened to notice it on. All links except the one for the str type point to the offline pages, while the one for str points to the online nightly page. However contrastingly the other link to str just above that one, in the return type, points to the offline page. Essentially all links to std types point offline, except those to primatives, which point online when within the doc comments but offline if in the type/function description.

It seems that the handling of primatives for intra-doc-link processing makes an assumption that links should always point to the online page, without making any exception for the std crate itself, unlike what is done otherwise.

Metadata

Metadata

Assignees

Labels

A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameT-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