-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-reachable-privIssues involving private types that are indirectly reachable or effect the public apiIssues involving private types that are indirectly reachable or effect the public apiC-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.
Description
When I generate docs via cargo doc
, types used in type definitions are not documented. This is a problem when a module exports a type definition but not the types on which it is based, because even though the type definition is documented, it is entirely opaque.
For example:
pub mod foo {
mod bar {
pub struct Foo<T> { ... }
impl<T> Foo<T> { ... }
}
pub type Foo = bar::Foo<i32>;
}
None of the methods on foo::bar::Foo<T>
will be documented, and the documentation for foo::Foo
will be nothing more than its type definition (and any documentation on the type definition itself).
I've tried removing the skip-private
pass using the following command, and that still does not document the types used in the type definitions:
cargo rustdoc -- --passes=strip-hidden --passes=collapse-docs --passes=unindent-comments
Is this the expected behavior? Is there some way to document these types without exporting them?
Metadata
Metadata
Assignees
Labels
A-reachable-privIssues involving private types that are indirectly reachable or effect the public apiIssues involving private types that are indirectly reachable or effect the public apiC-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.