-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 the descriptions of traits’ implementations if any #26871
Comments
This used to work. @alexcrichton did you change this? |
I do vaguely remember intentionally removing this because it was way too noisy, but I have a feeling that we just blanket inlined documentation instead of only displaying documentation that was explicitly written. I think it'd be fine to implement this, and at the very least we could just browse around the docs and see how they looked. |
This is the same issue as #24838. Note that you can document the impl by putting the doc on top of the |
Many impls are documented with the docs inside the methods (all in std I think), it's quite a loss not to display them. If it's noisy, maybe collapse them by default? Things like |
I agree with @leodasvacas - I'm having a huge problem with this right now because I have a trait that is virtually an interface and can provide no information about how its used when implemented by other structs. |
@erip You can provide something as noted above, the doc comment above the |
@bluss Yes, but that is a little clumsy and it doesn't maintain the nice layout expected by rustdocs. I'll use it for now, but I hope this doesn't get overlooked - I notice it's been open for at least 6 months. |
Add test to check this resolves rust-lang#24838 and rust-lang#26871.
…s, r=alexcrichton Restore trait impl docs Currently, documentation on methods in trait implementations doesn't get rendered. This changes that; trait implementations have all documentation associated with impl items displayed (documentation from the trait definition is ignored). Fixes rust-lang#24838 Fixes rust-lang#26871
Right now if one adds additional information to an implementation of a trait’s method, that information is not shown in the output of
rustdoc
. For instance, the implementation ofDrop
forRc
has an elaborate description with an example; however, this information is not accessible to the readers.Regards,
Ivan
The text was updated successfully, but these errors were encountered: