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 incorrectly orders trait impls #40905

Open
ghost opened this issue Mar 29, 2017 · 2 comments
Open

Rustdoc incorrectly orders trait impls #40905

ghost opened this issue Mar 29, 2017 · 2 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

@ghost
Copy link

ghost commented Mar 29, 2017

Documentation for Rc: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html
Source code: https://doc.rust-lang.org/nightly/src/alloc/rc.rs.html#263-265

In the source impls for !Send and !Sync come one after another. In the generated documentation they don't.

The docs should respect the order of impls in the source - that's what I've been told in the #rust-docs channel. In fact, other impls for Rc apparently don't follow the order from the source either. What order do they follow? :)

@steveklabnik steveklabnik added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-tools labels Mar 29, 2017
@steveklabnik steveklabnik added T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. and removed T-tools labels May 18, 2017
@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 27, 2017
@jyn514
Copy link
Member

jyn514 commented Jul 7, 2021

Triage: on nightly, these now happen to match the source order, but I think because they're in alphabetical order, not because rustdoc is trying to match the original order; Borrow is shown after AsRef even though it comes earlier in source order.
image
image

Matching source order seems useful to me, but conflicts with #51129. Maybe we should give sorting Trait and !Trait precedence, and then sort by source order after that? Sorting by alphabetical order also seems reasonable, though.

@jyn514 jyn514 removed the T-dev-tools Relevant to the dev-tools subteam, which will review and decide on the PR/issue. label Jul 7, 2021
@hkBst
Copy link
Member

hkBst commented Feb 7, 2025

What is the situation here?

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

4 participants