-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: link to the source of the re-export if the original definition wasn't documented #81311
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
Comments
I looked around in the source a bit - this should have been generated around rust/src/librustdoc/html/render/mod.rs Line 1741 in 72c7b70
rust/src/librustdoc/html/render/mod.rs Line 1650 in 72c7b70
None for some reason.
|
Rustdoc successfully generates an pub struct Foo;
pub type Bar = Foo; |
By contrast, |
The following does reproduce this issue: a/lib.rspub struct Foo;
pub type Bar = Foo; b/lib.rspub use a::{Foo, Bar}; Here, both What could be done instead is having an |
Hmm, maybe rustdoc should fall back to showing the re-export if the original definition isn't available. |
Yeah, that seems good. |
Hmm, I'm not sure if this is right. I'm not sure why it's working in this case but not your repro... |
The difference is that here, |
Ah, I see what you mean 👍 |
If #41903 is implemented, it should also fix this issue. |
It looks like that issue has been closed as intended behavior? |
Yup, I commented here before it had been closed. |
I'll try doing this |
https://doc.rust-lang.org/nightly/nightly-rustc/rustc_data_structures/fx/type.FxHashMap.html Seems like this issue is solved. |
It looks like at some point bootstrap started passing // inner crate
pub type DMatrix = Vec<u32>;
// outer crate
pub use inner::DMatrix; |
@jyn514 Can I work on this issue? |
Sure :) use |
@rustbot claim |
The problem appears to be with generate href for the undocumented item in rust/src/librustdoc/html/render/context.rs Lines 327 to 338 in 8834629
This in turn is caused may be incorrect Cache population. rust/src/librustdoc/formats/cache.rs Lines 154 to 161 in 8834629
When cache is populated, the crate location (ExternalLocation) is set as Unknown. For crates linked via workspace, they are classified as local by checking crate name exists in destination path. For other external crates, we deduce it from tcx. rust/src/librustdoc/clean/types.rs Lines 213 to 221 in 8834629
But We probably need to modify My test repo to reproduce the issue https://github.com/vramana/test-rustdoc-link |
Type aliases don't seem to have [src] links currently; see for example
rustc_data_structures::fx::FxHashMap
:The text was updated successfully, but these errors were encountered: