You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Methods from Deref<Target=[T]> doesnt appear for type aliases #134868
I have a type alias for a type that implements Deref<Target=[T], but Rustdoc doesnt generate the corresponding section in the sidebar like it does for the concrete type I'm aliasing
This is because rustdoc injects impls for type aliases using JS (to avoid doc size ballooning). The Deref impl is shown, just not the specialized Methods from Deref section. I suppose we'd just need to add special support for this to the code that generates the JS, as well as to the JS itself? cc @notriddle
The discussion I've been putting off is whether Deref should, in general, work this way. There's not really any particular difference from type aliases: most crates use it sparingly, but a few of them (for example, gtk) make extensive use of it.
Activity
camelid commentedon Dec 29, 2024
This is because rustdoc injects impls for type aliases using JS (to avoid doc size ballooning). The Deref impl is shown, just not the specialized Methods from Deref section. I suppose we'd just need to add special support for this to the code that generates the JS, as well as to the JS itself? cc @notriddle
notriddle commentedon Dec 30, 2024
Yes, that sounds like a reasonable idea.
The discussion I've been putting off is whether Deref should, in general, work this way. There's not really any particular difference from type aliases: most crates use it sparingly, but a few of them (for example, gtk) make extensive use of it.
GuillaumeGomez commentedon Sep 30, 2026
Opened #163571.