Skip to content

rustdoc::clean is missing glob re-exports #130360

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

Open
lolbinarycat opened this issue Sep 14, 2024 · 1 comment
Open

rustdoc::clean is missing glob re-exports #130360

lolbinarycat opened this issue Sep 14, 2024 · 1 comment
Labels
A-local-reexports Area: Documentation that has been locally re-exported (i.e., non-cross-crate) C-discussion Category: Discussion or questions that doesn't represent real issues. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@lolbinarycat
Copy link
Contributor

Location

https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/clean/index.html

Summary

items like clean::Item should show up here, but they do not, they only show up at their original definition site, clean::types::Item.

possibly related: #53724

@lolbinarycat lolbinarycat added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Sep 14, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 14, 2024
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-local-reexports Area: Documentation that has been locally re-exported (i.e., non-cross-crate) C-discussion Category: Discussion or questions that doesn't represent real issues. and removed A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 14, 2024
@fmease
Copy link
Member

fmease commented Sep 14, 2024

I think this is intentional given the fact that the types "re-export" (well, import) is only crate-public, not public. It's pub(crate) use self::types::*; in clean/mod.rs.

Indeed, rustc, rustdoc etc get documented with --document-private-items. However, we never render non-public uses1. A case could be made that we should inspect the visibility more closely but eh, dunno (and it wouldn't work for root modules / crate roots as there, the following holds: pub(crate) use == pub(self) use == use).

Footnotes

  1. Edit: I guess there are cases where we do ^^, e.g. with #[doc(no_inline)], maybe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-local-reexports Area: Documentation that has been locally re-exported (i.e., non-cross-crate) C-discussion Category: Discussion or questions that doesn't represent real issues. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants