-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Generated documentation should display implicit trait implementations #33772
Comments
FYI, this implementation exists in case people were confused about the description above: impl<T> ToString for T where T: Display + ?Sized |
I'll take a look. |
I've been looking for a few days and here are my current issues:
|
I have been working through the source code for method resolution (ie: how rustc resolves I am under the impression that most of the logic found in the source for method resolution can translate to listing out implicit trait implementations. I'll take a look after I'm finsihed with the documentation, but if anyone else is curious to give it a stab, take a look at reference links found in 36427. |
Awesome, thanks for sharing @cbreeden! I've been wanting to look into this issue, but I'm still reading through the librustdoc module. I haven't (yet) made any progress on this issue. Will update here if I do. |
How would this information be shown for generic types? i.e. |
@HybridEidolon Is there any reason you can think of why the shouldn't go in the already existing "Trait Implementations" section? |
@HybridEidolon: For the moment, "everyone" wants it. If your issue is just for the output wording, we can always resolve the type name before printing. |
I'll give a serious look into this to settle this matter once and for all. |
This came up again today, just FYI. From what I've heard, RLS has the potential to help a lot with generating documentation. Is this being actively worked on, or is it blocked on that? |
Existing rustdoc is not being actively worked on. Well, @GuillaumeGomez is doing some things, but we're generally not tackling this kind of bug right now. The idea is that the new rustdoc will be fixing this kind of thing. |
@steveklabnik first time I've heard about a new rustdoc. Is there a discussion or tracking issue somewhere to read up on it? ( a quick search didn't help me find anything). |
@theduke I've heard rumors floating around for awhile now that the new |
https://github.com/steveklabnik/doxidize Edit: nvm, apparently that's a far future project.
@steveklabnik This is no longer true, correct? |
PR to fix it is now open. |
[rustdoc] Generic impls Fixes #33772. r? @QuietMisdreavus
In this example, I'm able to call
let a = A; a.to_string()
sinceA
implementsfmt::Display
. The generated documentation doesn't mention anything aboutto_string
. It'd be great if the documentation displayed all available methods for a given structure.The text was updated successfully, but these errors were encountered: