Skip to content

cargo doc should only include &self methods from Deref target #3641

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

Closed
Storyyeller opened this issue Feb 3, 2017 · 2 comments
Closed

cargo doc should only include &self methods from Deref target #3641

Storyyeller opened this issue Feb 3, 2017 · 2 comments

Comments

@Storyyeller
Copy link

Storyyeller commented Feb 3, 2017

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.

@alexcrichton
Copy link
Member

Thanks for the report! I think this is more of a rustdoc bug, though, so could you open a report over at rust-lang/rust?

@Storyyeller
Copy link
Author

Done (rust-lang/rust#39550)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants