rustdoc should only include &self methods from Deref target #39550
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentor
Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
T-dev-tools
Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Currently, if Foo impls Deref<Target=Bar>, then the generated documentation for Foo will include every method defined on Bar, regardless of receiver type. &mut self methods should only be included if DerefMut is impled, and self methods shouldn't be included at all.
It may also be worth excluding methods on the Deref target from the generated documentation if a method of the same name is defined on the original type, since that's the one that will be called under normal circumstances.
The text was updated successfully, but these errors were encountered: