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

rustdoc: missing type parameters on impls of generic traits #14508

Closed
aturon opened this issue May 29, 2014 · 8 comments
Closed

rustdoc: missing type parameters on impls of generic traits #14508

aturon opened this issue May 29, 2014 · 8 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@aturon
Copy link
Member

aturon commented May 29, 2014

Sometimes, but not always, rustdoc does not record the type parameters for a trait impl.

For example, the Rc type (http://static.rust-lang.org/doc/master/std/rc/struct.Rc.html) correctly shows the type parameter for the Hash impl but does not show it for Deref impl.

@sfackler
Copy link
Member

Dup of #14462

@aturon
Copy link
Member Author

aturon commented May 29, 2014

@sfackler Are you sure this is a dup? It doesn't seem covered by the issue you referenced.

cc @alexcrichton

@sfackler
Copy link
Member

Isn't this the first bullet? ("Lifetime parameters on functions are missing")

@sfackler
Copy link
Member

Although that other issue may only explicitly cover the trait itself, not the impls.

@aturon
Copy link
Member Author

aturon commented May 29, 2014

No -- I was referring to the line that says what trait is being implemented. Currently, for Rc, you get:

impl<T> Deref for Rc<T>

but you should get

impl<T> Deref<T> for Rc<T>

These are regular type parameters to the trait itself, not lifetime parameters on a function.

@sfackler
Copy link
Member

Oh!

@sfackler sfackler reopened this May 29, 2014
@alexcrichton
Copy link
Member

This is quite unusual. I will investigate.

@alexcrichton
Copy link
Member

I have a fix, will open a PR soon with some other improvements.

alexcrichton added a commit to alexcrichton/rust that referenced this issue May 30, 2014
Type parameters were filled in for some areas, but not all. This commit unifies
the two code paths to fill in type parameters everywhere.

Closes rust-lang#14508
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

3 participants