- Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateArea: Documentation that has been re-exported from a different crateA-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Description
Code
This reproduction needs two crates. Crate 1:
pub struct Foo { pub a: bool, #[doc(hidden)] pub b: bool, }Crate 2:
pub type Foo = crate_1::Foo; fn main() {}Or, to use public crates.io crates, make a type alias to euclid::Point3D.
Reproduction Steps
cargo doc then visit crate_2::Foo's documentation.
Expected Outcome
The “Aliased Type” of crate_2::Foo is identical to crate_1::Foo.
Actual Output
crate_1::Foo has a /* private fields */ marker in the struct display, but crate_2::Foo does not.
Version
rustdoc 1.91.0-nightly (0060d5a 2025-08-04)
rustdoc 1.89.0 (2948388 2025-08-04)
Additional Details
Necessary ingredients to reproduction are that:
- The field is hidden, not private
- The alias is in a different crate than the struct
@rustbot label +A-rustdoc-ui
Metadata
Metadata
Assignees
Labels
A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateArea: Documentation that has been re-exported from a different crateA-rustdoc-uiArea: Rustdoc UI (generated HTML)Area: Rustdoc UI (generated HTML)C-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.