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

Documentation text on trait impl methods is hidden in docs #24838

Closed
bluss opened this issue Apr 26, 2015 · 3 comments
Closed

Documentation text on trait impl methods is hidden in docs #24838

bluss opened this issue Apr 26, 2015 · 3 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@bluss
Copy link
Member

bluss commented Apr 26, 2015

I use documentation on my trait impls to tell users about how my types behave:

impl<N, E, Ty, Ix> Index<NodeIndex<Ix>> for Graph<N, E, Ty, Ix> where
    Ty: EdgeType,
    Ix: IndexType,
{
    type Output = N;
    /// Index the **Graph** by **NodeIndex** to access node weights.
    ///
    /// **Panics** if the node doesn't exist.
    fn index(&self, index: NodeIndex<Ix>) -> &N {
        &self.nodes[index.index()].weight
    }
}

This documentation is not rendered anymore. I expect to see it under the entry for the Index implementation of the Graph type.

I think this was lost after (the otherwise very awesome!) documentation changes by @alexcrichton

@bluss
Copy link
Member Author

bluss commented Apr 26, 2015

Note: Documentation on top of the impl item itself is properly rendered. If you too agree this is adequate, please close the issue again.

@bluss bluss changed the title Documentation text on trait impls is hidden in docs Documentation text on trait impl methods is hidden in docs Apr 26, 2015
@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 26, 2015
bluss pushed a commit to petgraph/petgraph that referenced this issue Apr 26, 2015
@milibopp
Copy link
Contributor

milibopp commented Jul 6, 2015

Just for reference: this also leaves the (perhaps not entirely obvious) operator impls on HashSets undocumented. Also see this SO question on this issue.

@mcast
Copy link
Contributor

mcast commented Jul 16, 2015

Yes, #27058 is dup of this. It is hiding stable parts of std from me: https://doc.rust-lang.org/1.1.0/src/core/result.rs.html#883-890

pierzchalski added a commit to pierzchalski/rust that referenced this issue Apr 14, 2016
Manishearth added a commit to Manishearth/rust that referenced this issue Apr 15, 2016
…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
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

4 participants