Rustdoc links to std - rendering on local verification build

⚓ Rust    📅 2026-07-08    👤 surdeus    👁️ 3      

surdeus

Rustdoc allows linking to std elements either directly by name [IntoIterator] or explicitly disambiguated [IntoIterator](std::iter::IntoIterator).

The hover and in-IDE links from rust-analyzer suggest that the links I have in place all work fine.

But when I build the docs locally to verify in a browser (both with or without --no-deps), the links don't render. The first shows as [IntoIterator], the second as IntoIterator (which points to an invalid url)

Is there any way to get cargo doc to build the local docs and place valid links to the online stdlib docs? All the RFCs, forum posts etc I could find were about using a locally hosted version of stdlib docs and I can't see how to bend any of them to this need.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed