-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo doc -Zbuild-std
doesn't generate links to the standard library
#88
Comments
Just curious, which of these behaviors would you expect to be the default, and which would you like the option of using?
|
I'd expect docs.rs to use (1), I'm not sure about local docs. Maybe I'd still expect (1) by default? |
Hmm. docs.rs uses --no-deps, so it needs 1 to at least be an option - i would be ok with manually passing --extern-html-root-url there if you don't want to support it in cargo. I'd expect 3. to be the behavior without --no-deps. I think with no-deps I'd expect 2. to be the default with a fallback to 1. if rust-docs isn't installed. |
Since this is specifically for build-std, rust-src will always be installed (edit: or if someone is silly enough to try and doc a crate they couldn't build on that same machine, it seems fine to just error out) |
I assume this was meant to be |
See for example https://docs.rs/gba/latest/gba/macro.include_aligned_bytes.html.
@Nemo157 and I think this is because
std
doesn't havehtml_root_url
set and cargo doesn't treat it as coming from crates.io, so-Zrustdoc-map
doesn't help. The fix is for cargo to internally pass-Zcrate-attr=doc(html_root_url=https://doc.rust-lang.org/stable/std)
, like bootstrap does: https://github.com/rust-lang/rust/blob/871b5952023139738f72eba235063575062bc2e9/src/bootstrap/compile.rs#L416-L419The text was updated successfully, but these errors were encountered: