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

Repeated and incorrect "Implementors" items #25061

Closed
murarth opened this issue May 3, 2015 · 9 comments
Closed

Repeated and incorrect "Implementors" items #25061

murarth opened this issue May 3, 2015 · 9 comments
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@murarth
Copy link
Contributor

murarth commented May 3, 2015

The docs pages for Send and Sync show duplicated and incorrect items in the "Implementors" section.

Specifically, an incorrect positive impl for Rc is present and the correct negative impl is present twice.
Also, impls for Arc and ArcInner appear multiple times, with and without trait bounds and where clauses, with Arc having three appearances:

impl<T> Send for Arc<T> where T: Send + Sync
impl<T: Sync + Send> Send for Arc<T>
impl<T> Send for Arc<T>
@bluss
Copy link
Member

bluss commented May 3, 2015

Also noting that ArcInner is private and should not appear.

@steveklabnik steveklabnik added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 7, 2015
@defuz
Copy link
Contributor

defuz commented Nov 29, 2015

Not only marker traits. From the bottom of Iterator doc page:

...
impl<'a> Iterator for Utf16Items<'a>
impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char>
impl<'a> Iterator for SplitWhitespace<'a>
impl Iterator for ToLowercase
impl Iterator for ToUppercase
...
impl<'a> Iterator for Utf16Items<'a>
impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char>
impl<'a> Iterator for SplitWhitespace<'a>
impl Iterator for ToLowercase
impl Iterator for ToUppercase
...

@mulkieran
Copy link

It should be noted (and I expect is related), that entries appear in what seems to be a completely random order.

@mulkieran
Copy link

It should also be noted that some entries have links where others do not, see example in: rust-lang/prev.rust-lang.org#841.

@QuietMisdreavus
Copy link
Member

Update: this is still a bit of a thorn, though some of it has been fixed. The repetition is because of a thing rustdoc likes to do where dependent crates can fill out a javascript "implementors" file to let their implementations show up on the trait's page, even though the struct is being documented later than the trait. However, this does not take into account whether the trait or the struct have been re-exported. So in std, where several traits and structs come from other crates and are re-exported to be part of std as well, these implementations show up in both the regular render and the implementors javascript file.

On a brighter note, it looks like rustdoc prints the trait bounds on all these impls now, so at least that part's been fixed.

@unageek
Copy link

unageek commented Sep 29, 2020

Maybe off-topic, but what's the point of these JavaScript-generated items being wrapped in tables?

var display = document.createElement("h3");
addClass(display, "impl");
display.innerHTML = "<span class=\"in-band\"><table class=\"table-display\">" +
"<tbody><tr><td><code>" + code.outerHTML + "</code></td><td></td></tr>" +
"</tbody></table></span>";
list.appendChild(display);

@jsha
Copy link
Contributor

jsha commented Jun 3, 2021

Related: #85418

@ehuss ehuss removed the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label Jan 18, 2022
@fmease
Copy link
Member

fmease commented Oct 18, 2022

I can no longer reproduce this: Only one impl is shown for Arc on pages of Sync & Send.

@Dylan-DPC
Copy link
Member

Closing this since it is has been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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