-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Split traits by crate-local and crate-non-local #130418
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
base: master
Are you sure you want to change the base?
Split traits by crate-local and crate-non-local #130418
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @notriddle (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This comment has been minimized.
This comment has been minimized.
@MeetThePatel something like "closes #124826" is something you should add to the PR message not to the title, thank you! |
I have a bunch of questions about how this is supposed to work...
But the most important thing to do, I think, is to figure out what problem this is trying to solve and how well it solves it. The original issue said this:
And it screenshotted a page that had only trait implementations from But it doesn't work everywhere. For example, Which alternatives might work for |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
8d3100e
to
303ae8d
Compare
Does anybody else on @rust-lang/rustdoc-frontend think this should be merged? I’m not so sure, because it seems like an incomplete solution. It makes winsafe better, but gtk worse. Assuming I understand correctly what problem this is trying to solve. |
I'm also not sure it's a better than what we currently have. I tend to think it's a tiny bit better than currently, but crates like |
The job Click to see the possible cause of the failure (guessed by this bot)
|
The main problem that I am trying to solve is to make more clear in the documentation the distinction between:
Note: Perhaps there is better terminology than standardized/non-standardized to describe this distinction. Motivating Example:
|
☔ The latest upstream changes (presumably #136943) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR adds the feature requested by #124826.
Typically, rustdoc generates a list of trait-impls sorted alphabetically. However, in situations where a large number of traits are implemented for a struct/enum, it may be helpful to see the crate-local traits separate from the crate-nonlocal traits.
As a toy example, consider the following code:
The current behaviour of rustdoc is to generate the following:

This PR changes this behaviour to the following:
