You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
When a specific implementation of a trait isn't commented the docs are inherited from the trait. It would be great if this fact was called out.
An example of why this is useful:
The current doc for Rc has:
impl Clone for Rc
fn clone(&self) -> Rc
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
The description doesn't make sense for Rc as you can't put an owned pointer in an Rc so the doc becomes confusing. If there were an indication that the doc was inherited it would be better.
impl Clone for Rc
fn clone(&self) -> Rcdoc inherited from trait Clone
Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.
The text was updated successfully, but these errors were encountered:
I personally think we should just follow haskell's lead and omit the docs from traits (I'm happy to differ from haddock and keep the individual method signatures displayed still, and to show any explicit docs on the impl'd methods).
The docs from the trait are not specific to the current leading to confusion (depending on the wording, as this issue shows), and are, in many cases, just useless filler (why does one need to navigate around the same doc comment for Clone::clone on nearly every type definition page?).
The trait definition are clickable, so a user can easily navigate to the trait to see the docs there, if necessary.
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
When a specific implementation of a trait isn't commented the docs are inherited from the trait. It would be great if this fact was called out.
An example of why this is useful:
The current doc for Rc has:
The description doesn't make sense for Rc as you can't put an owned pointer in an Rc so the doc becomes confusing. If there were an indication that the doc was inherited it would be better.
doc inherited from trait Clone
The text was updated successfully, but these errors were encountered: