-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Documentation on re-exports is ignored if the item is defined in the same crate #84619
Comments
Concatenating both doc-comments seems slightly strange to me, at least for the same crate. My expectation is that the re-export would have its own and, if you navigate to the re-exported name, you see the original documentation. |
@Lonami concatenating them is what rustdoc does for cross crate links, it should do the same thing for intra crate links. We shouldn't change it now. |
Well, here's why: rust/src/librustdoc/clean/inline.rs Lines 49 to 51 in 6c2dd25
but removing that block breaks rustdoc quite a lot:
|
I'm not familiar with rustdoc tests, but looks like we should just update the expected results for the tests (assuming we do want to do this change, of course). As in, I don't think things are "breaking" as signaled by the failing tests with this change, but rather it just needs updating. |
@Lonami no, there are larger changes, it's not just documentation being added. I don't have the exact output on hand, it was a lot. |
I tried this code:
I expected to see this happen: The documentation is added, like it is for cross-crate re-exports:
Instead, this happened: The documentation is ignored:
Meta
rustdoc --version
: rustdoc 1.53.0-nightly (392ba2b 2021-04-17)Originally posted by @jsgf in #84597 (comment)
The text was updated successfully, but these errors were encountered: