Skip to content

rustdoc: trait pages don't show impl docs #51834

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

Closed
llogiq opened this issue Jun 27, 2018 · 3 comments
Closed

rustdoc: trait pages don't show impl docs #51834

llogiq opened this issue Jun 27, 2018 · 3 comments
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@llogiq
Copy link
Contributor

llogiq commented Jun 27, 2018

For example, the page for u64 shows an impl From<bool> for u64 that is well documented, whereas the page for From shows only the bare trait and method signature without any docs.

I see the method html/render.rs: fn render_implementor(..) appears to render the trait implementors, but I don't have enough time to navigate the byzantine structure of librustdoc to find where best to insert the doc comments. If someone knowledgeable agrees to mentor me here, I'll gladly take this.

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 27, 2018
@GuillaumeGomez
Copy link
Member

As far as I can tell, this is intended. Implementors section is big, adding docs in it would make it very. We could add a short version of it like we do in some other places?

@llogiq
Copy link
Contributor Author

llogiq commented Jun 27, 2018

I don't see where the problem is: The u64 page shows the docs only when expanded, so there is no extra space needed – the button to expand comes directly before the impl part, and that space is otherwise empty.

My example is exemplary in another sense, too: From the trait page, you're not going to know whether a particular impl

  • allocates
  • requires other resources
  • loses information

The impl docs might shed light on those issues, but you'll have to click on the implementing type, then search for the trait impl on that page, which, I argue, makes for bad UX.

@GuillaumeGomez
Copy link
Member

Ok, I'll add it then, hidden by default.

@GuillaumeGomez GuillaumeGomez self-assigned this Jun 27, 2018
bors added a commit that referenced this issue Sep 8, 2018
…mulacrum,QuietMisdreavus

Trait impl show docs

Fixes #51834.

<img width="1440" alt="screen shot 2018-06-29 at 00 14 33" src="https://user-images.githubusercontent.com/3050060/42063323-6e6e8cc8-7b31-11e8-88ef-4dd2229df76c.png">

(You can see both commit changes in the screenshot 😄)

r? @QuietMisdreavus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants