Inherent associated types have been proposed for a very long time (7+ years). There is currently tracking issue #8995 for this, but nothing is listed as blocking. As far as I'm aware, this has never been implemented, but I also don't believe there should be anything major to hash out, given that associated consts are very much a thing (presumably some code could be shared?).
The reason I ask is because I recently wrote this code:
FormatDescription::Component(Component::Date(component::Date::Day(
component::date::Day {
// irrelevant details
},
)))
…which is terrible to read. Admittedly, I have the component
module in scope to avoid bringing in a ton of structs, but even without that it's still a bit wild. Consider the alternative if inherent associated types were a thing:
FormatDescription::Component::Date::Day(Day {
// irrelevant details
})
Now the only repetition is for the enum → struct mapping, which is far better than before. The hierarchy is still clear, while repetition is minimal. I'd naturally prefer enum variant types as well, but that RFC hasn't even been merged yet.
So while I suppose it's a bit selfish, that's also the name of the game with most proposals What can be done to help push this forward?