Skip to content

Rustdoc is showing definitions of "private" types in type def documentation #142019

Open
@weiznich

Description

@weiznich

I tried this code:

diesel-rs/diesel@116e868

cargo +nightly doc --open -p diesel --no-deps

Search for diesel::dsl::Eq afterwards to get to this page

I expected to see this happen: Rustdoc hides the aliased type + tuple field sections as the Grouped by type is not exposed as part of the public API. (That type is in a crate local module)

Instead, this happened: Rustdoc shows information about private types.

Meta

rustdoc --version --verbose:

rustdoc 1.89.0-nightly (59aa1e873 2025-06-03)
binary: rustdoc
commit-hash: 59aa1e873028948faaf8b97e5e02d4db340ad7b1
commit-date: 2025-06-03
host: x86_64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-local-reexportsArea: Documentation that has been locally re-exported (i.e., non-cross-crate)A-visibilityArea: Visibility / privacyC-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions