-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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
For a struct
and const
declared as:
pub struct HiddenFoo {
#[doc(hidden)]
pub foo: usize,
}
pub const SOME_FOO: HiddenFoo = HiddenFoo { foo: 10 };
rustdoc
currently renders:
pub const SOME_FOO: HiddenFoo
SOME_FOO: HiddenFoo = HiddenFoo { foo: 10 };
This unhides the hidden foo
field. Instead, it should respect the #[doc(hidden)]
attribute on foo
and render the following:
pub const SOME_FOO: HiddenFoo
SOME_FOO: HiddenFoo = HiddenFoo { .. };
Or, better yet, if all fields are hidden, then I'd prefer for it to not render the definition at all:
pub const SOME_FOO: HiddenFoo
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.