Closed
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