Imagine type alias which is used to hide several levels of generics:
type Foo = Wrapper<Bar<u32>, Option<u64>>;
Currently rustdoc simply shows the alias definitions and that's it. You can not see at a glance traits implemented by alias and docs for them, you have to look into Wrapper
/Bar
docs and piece everything in your head, which is obviously quite inefficient. Even worse, in some cases it performs unexpected de-aliasing which can significantly harm readability. The latter problem is especially bad with typenum
(in some cases we still have to use it, since const generics are not powerful enough) where a simple U32
in docs gets blown into:
UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
What about adding an attribute which would force rustdoc to treat type aliases like independent types during doc generation? Meaning it would show traits implemented for aliases marked by the attribute and will not de-alias their use in other docs.
Or maybe such behavior should become the default one?