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

Blanket trait impls are not listed as implementations in rustdoc #29503

Closed
bluss opened this issue Nov 1, 2015 · 6 comments
Closed

Blanket trait impls are not listed as implementations in rustdoc #29503

bluss opened this issue Nov 1, 2015 · 6 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 Nov 1, 2015

ToString has the implementation impl<T: fmt::Display + ?Sized> ToString for T which is not listed in its documentation page.

It is however listed in libstd, so rustdoc does the correct thing after doc inlining.

This bug with blanket impls shows up in user's crates, see discussion on users.rust-lang; for example the Itertools trait in itertools does not have its blanket impl visible in the docs.

@bluss bluss added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 1, 2015
@pmarcelll
Copy link
Contributor

It regressed on nightly, it also disappeard from the libstd page.

@jethrogb
Copy link
Contributor

jethrogb commented Apr 15, 2016

The regression is not due to specialization, see e.g. https://doc.rust-lang.org/stable/std/any/trait.Any.html vs https://doc.rust-lang.org/nightly/std/any/trait.Any.html which does not use specialization. Regression is also visible on beta btw.

@flying-sheep
Copy link

flying-sheep commented May 6, 2016

hmm, is this bug affecting me? my docs, corresponding src

@bluss
Copy link
Member Author

bluss commented May 6, 2016

@flying-sheep Yes, it's the same bug.

@flying-sheep
Copy link

thanks. a bit confusing, since that impl is the whole point of my crate 😄

birkenfeld added a commit to birkenfeld/rust that referenced this issue May 9, 2016
In `impl<T> Trait for T`, the blanket type parameters `T` were
recognized as "local" and "not exported", so these impls were
thrown out.

Now we check if they are generic, and keep them in that case.

Fixes: rust-lang#29503
Manishearth added a commit to Manishearth/rust that referenced this issue May 9, 2016
rustdoc: do not strip blanket impls in crate of origin

In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out.

Now we check if they are generic, and keep them in that case.

Fixes: rust-lang#29503
Manishearth added a commit to Manishearth/rust that referenced this issue May 9, 2016
rustdoc: do not strip blanket impls in crate of origin

In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out.

Now we check if they are generic, and keep them in that case.

Fixes: rust-lang#29503
Manishearth added a commit to Manishearth/rust that referenced this issue May 9, 2016
rustdoc: do not strip blanket impls in crate of origin

In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out.

Now we check if they are generic, and keep them in that case.

Fixes: rust-lang#29503
@jethrogb
Copy link
Contributor

The regression was already fixed in #33133

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