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
For a
structandconstdeclared as:rustdoccurrently renders:This unhides the hidden
foofield. Instead, it should respect the#[doc(hidden)]attribute onfooand render the following:Or, better yet, if all fields are hidden, then I'd prefer for it to not render the definition at all: