Skip to content
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

Trait implementations should show summary line in documentation #33672

Closed
steveklabnik opened this issue May 16, 2016 · 2 comments
Closed

Trait implementations should show summary line in documentation #33672

steveklabnik opened this issue May 16, 2016 · 2 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@steveklabnik
Copy link
Member

We've always been unsure how much information to show about implementations, and right now, we only show signatures. On HN someone suggested that including the summary line would be helpful, so that you can understand what these things actually do, if you haven't used that particular trait before.

@steveklabnik steveklabnik added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-enhancement Category: An issue proposing an enhancement or a PR with one. labels May 16, 2016
@Manishearth
Copy link
Member

Perhaps we should somehow link to the full description? With a [read more]-like link

@alilleybrinker
Copy link
Contributor

Reducing the amount of link chasing necessary to understand what a function does sounds like a good idea, and I agree with @Manishearth that a "read more" link should be included. The question then is how much of the description to include. First sentence? Some arbitrary number of characters?

Manishearth added a commit to Manishearth/rust that referenced this issue May 18, 2016
Manishearth added a commit to Manishearth/rust that referenced this issue May 21, 2016
… r=alexcrichton

rustdoc: Add doc snippets for trait impls, with a read more link

The read more link only appears if the documentation is more than one line long.

![screenshot from 2016-05-17 06 54 14](https://cloud.githubusercontent.com/assets/1617736/15308544/4c2ba0ce-1bfc-11e6-9add-29de8dc7ac6e.png)

It currently does not appear on non-defaulted methods, since you can document them directly. I could make it so that default documentation gets forwarded if regular docs don't exist.

Fixes rust-lang#33672

r? @alexcrichton

cc @steveklabnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. 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

3 participants