-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: Show methods from the whole Deref/DerefMut chain instead of only one level #71640
Comments
I think that all non-direct elements should be listed with no docs and just a link to their original items' page. Just adding a title before them to say that they come from the deref type. What do you think? |
Non-direct meaning that also e.g. the docs of |
One option would be to show the direct deref target as we do now, and pre-collapsed indirect deref targets all the way down. |
Duplicate of #26207. |
…GuillaumeGomez Recursively document methods via `Deref` traits This changes `rustdoc` to recursively follow `Deref` targets so that methods from all levels are added to the rendered output. This implementation displays the methods from all levels in the expanded state with separate sections for each level. ![image](https://user-images.githubusercontent.com/279572/103482863-46723b00-4ddb-11eb-972b-c463351a425c.png) Fixes rust-lang#26207 Fixes rust-lang#53038 Fixes rust-lang#71640 r? `@jyn514`
See for example https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/message/struct.Message.html#deref-methods.
The type it derefs to also has another deref impl that would be useful to include here, see https://gstreamer.pages.freedesktop.org/gstreamer-rs/gstreamer/miniobject/struct.GstRc.html#impl-Deref .
In this case the expected result would be that the methods of both
GstRc
andMessageRef
would be shown in the docs ofMessage
.CC @GuillaumeGomez @kinnison @rust-lang/rustdoc
The text was updated successfully, but these errors were encountered: