Skip to content

Documentation for Clone lists incorrect implementation definitions #26384

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
Nashenas88 opened this issue Jun 18, 2015 · 4 comments
Closed

Documentation for Clone lists incorrect implementation definitions #26384

Nashenas88 opened this issue Jun 18, 2015 · 4 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Nashenas88
Copy link
Contributor

The documentation for Clone states that the first implementor is Wrapping:
impl<T> Clone for Wrapping<T> where T:_Clone + Clone_

Range is even more interesting:
impl<Idx> Clone for Range<Idx> where Idx:_Clone + Clone + Clone_

I would think that these should be documented as impl<T> Clone for Wrapping<T> where T: Clone and impl<Idx> Clone for Range<Idx> where Idx: Clone, respectively.

@steveklabnik
Copy link
Member

I believe this is a duplicate, but can't quite find it.

It's certianly something strange with Clone.

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

Aatch commented Jun 18, 2015

@steveklabnik this seems like 3 issues, really:

  1. Deriving produces duplicate bounds.
  2. The compiler doesn't de-duplicate them later.
  3. Rustdoc doesn't de-duplicate them.

Ideally, the deriving code shouldn't be generating the duplicates (and conversion with @huonw suggests that it's just left-over code from an experiment with a different deriving technique). The other two cases would be nice to fix too though.

@Nashenas88
Copy link
Contributor Author

Sorry, I accidentally clicked "close" instead of "cancel". @steveklabnik, I also thought it would be a duplicate, but I spent quite some time searching for an existing one with no luck. I filed it in case it was one of those where everyone thought it was filed, but wasn't.

@alexcrichton
Copy link
Member

I think the dupe we're searching for is #25022, so closing in favor of that.

# for free to join this conversation on GitHub. Already have an account? # 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