1
Fork 0

rustdoc: bind typedef inner type items to the folding system

This let's us handle a multitude of things for free:
 - #[doc(hidden)]
 - private fields/variants
 - --document-private-items
 - --document-hidden-items

And correct in the process the determination of "has stripped items" by
doing the same logic done by other ones.
This commit is contained in:
Urgau 2023-08-18 17:57:20 +02:00
parent 6b3bba8c3e
commit af6889c28c
6 changed files with 53 additions and 36 deletions

View file

@ -22,6 +22,8 @@ pub enum IrTyKind<A, B> {
TyKind(A, B),
// no comment
StructKind { a: A, },
#[doc(hidden)]
Unspecified,
}
// @has 'inner_variants/type.NearlyTyKind.html'
@ -52,7 +54,9 @@ pub type OneOrF64 = OneOr<f64>;
// @has 'inner_variants/struct.One.html'
pub struct One<T> {
pub val: T,
__hidden: T,
#[doc(hidden)]
pub __hidden: T,
__private: T,
}
// @has 'inner_variants/type.OneU64.html'