-
Notifications
You must be signed in to change notification settings - Fork 203
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
docs.rs failing to resolve links to feature gated items even though all-features is set to true #2100
Comments
Seems like it's a bug in recent rustdoc, testing locally with |
After some manual bisection I feel pretty confident that rust-lang/rust#94857 was the cause. The macro here is a re-export which previously would have the link resolved during the final doc-build of |
Opened rust-lang/rust#110183 about it. |
Note that this seems to be occurring even for a pub const (not in a proc macro crate) in my case, but hopefully what you're mentioning @Nemo157 is the root cause edit: if you browse around the docs, you'll see broken links to regular items in the |
Do you mean like the There are actually two |
@Nemo157 do I understand correctly that rust-lang/rust#110183 is the actual issue, which means we could close this one here? |
Yep, we can't really do anything till rust-lang/rust#110183 is fixed, once that is we could do a rebuild of the crate (though it looks like the new versions makes these non-links, we could rebuild the old version to verify it starts working then @sam0x17 could revert those changes to get the links finally). |
This is for the crate
macro_magic
: https://crates.io/crates/macro_magicOn this page I have some links to some things that are feature-gated within my crate: https://docs.rs/macro_magic/0.2.12/macro_magic/attr.export_tokens.html
Notice that the links to things in
syn
and local feature gated items are all broken (this did not happen before the feature gating).I deal with this by always running cargo doc locally with
cargo doc --all-features
. Under these conditions all the links resolve fine and everything in my crate is properly documented.To get this to work in docs.rs, I was told to add the following to my
Cargo.toml
, which I did several versions ago.However, docs.rs still isn't resolving links to any of the feature gated items, whether they be to items in optional external crates like syn, or local constants and things that are feature gated. Links to anything feature gated will not work.
Strangely, however, I am able to go to the doc pages for those things, I just can't link to them. I think this is a legitimate bug in docs.rs
That said, happy to hear if there is a quick fix as I'm mostly just trying to fix my docs and I haven't seen this be an issue for other similar crates so I don't know what is going on
The text was updated successfully, but these errors were encountered: