-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: "Methods from Deref<...>" too low on sidebar #85618
Comments
Ah, looks like this was intentional in #83826, after conversation in #83133. Removing C-bug and regression-from-stable-to-beta. Keeping this open as a discussion issue: I think putting "Methods from Deref" further down than trait implementations is wrong for String, because so many of its important methods are on |
I'd like to voice that I also think this is a kind of regression. 99% of the time I go to a type's page, I'm looking for methods, not traits; I've gotten used to seeing |
@jyn514, @slightlyoutofphase, what do you think of reverting #83826 while we look for a better solution. From #83133:
The problem with this is sometimes the "Methods from Deref" section refers to a type in the crate. Particularly for Vec and String, about half of the most useful methods are on Those are types that are a critical part of the new user learning path, and it's a good user experience for those to be right next to the other methods, both in the sidebar and in the doc. I suspect there are other ways to solve the need expressed in #83133 without affecting the page layout of Vec and String in this way. |
FWIW, I originally opened that issue with something more like a directly configurable way of specifying the page layout order for your own crate in mind. I still think that would ultimately be the best solution here. Unsure what the best approach would be, though, as far as top level attribute vs. command-line flag vs. any other way of doing it. Other stuff like what is and isn't "collapsed" by default should probably be configurable also, I'd say. |
Steps to reproduce:
Expected result:
Methods from Deref section comes immediately after Methods.
Actual result:
Methods from Deref section comes below Trait Implementations, Auto Trait Implementations, and Blanket Implementations.
Compare vs https://doc.rust-lang.org/std/string/struct.String.html, which has the correct ordering.
The text was updated successfully, but these errors were encountered: