Very cool new rustdoc feature
A very cool contribution was just merged in rustdoc. If you have a type alias like this:
pub enum IrTyKind<'a, I: Interner> {
AdtKind(&'a I::Adt),
TyKind(I::Adt, I::Ty),
}
pub type TyKind<'a> = IrTyKind<'a, TyCtxt>;
The type alias page will now display the inferred enum variants, making it much better.
I wanted to share this here (contrary to when I do it only on social media like twitter and mastodon) as I think it's something that will greatly improve every Rust user's experience when browsing documentation. Enjoy!
PR: https://github.com/rust-lang/rust/pull/114855
Some examples of this feature: