News for hackers. Stuff that matters.
Re:Rust 1.48 by Buttons840 on Thursday November 19, 2020 @12:07PM (#25151594)
Is it possible to link your local core and library docs yet?

I have my dependencies documented locally, I have the standard library documented locally, both of these work well with the ability to do searches just like the online docs. The problem is they're separate. The local docs for one of my crates cannot link to my local standard library docs; instead, I have to jump around different browser tabs and manually look things up.

There used to be some hacks that could work around this, but those hacks stopped working.

Re:Rust 1.48 by est31 on Thursday November 19, 2020 @12:18PM (#25151721)
Interesting question. Does RUSTDOCFLAGS="--extern-html-root-url std=file:///path/to/std/docs" cargo doc work? You can repeat it for std, core, alloc, proc-macro, etc.
Re:Rust 1.48 by steveklabnik on Thursday November 19, 2020 @12:21PM (#25151758)
You need a -Z unstable-options in there too, but this does not work for me with the latest nightly.
Re:Rust 1.48 by est31 on Thursday November 19, 2020 @12:26PM (#25151834)
Hmm apparently there is a cargo feature for it now: https://github.com/rust-lang/cargo/blob/master/src/doc/src/r...

So something like this in .cargo/config:

[doc.extern-map]

std = "local"

And then cargo +nightly doc -Zrustdoc-map.

Re:Rust 1.48 by steveklabnik on Thursday November 19, 2020 @02:21PM (#25153286)
Very cool!