Skip to content

Documentation for Vec does not list iter() method #21728

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
Swatinem opened this issue Jan 28, 2015 · 4 comments
Closed

Documentation for Vec does not list iter() method #21728

Swatinem opened this issue Jan 28, 2015 · 4 comments

Comments

@Swatinem
Copy link
Contributor

So rustdoc does not list the .iter() method on the page for Vec itself.
This might be extremely confusing for newcomers.

Actually impl<T> Deref for Vec<T> type Target = [T]
And impl<T> SliceExt for [T]
And SliceExt defines the .iter() method.

So this does all make sense, but I don’t think a newcomer can wrap his head around that. I spent 5 minutes looking this up myself after I introduced Rust to a group of people.

@steveklabnik
Copy link
Member

We have an issue open already to improve rustdoc's handling of Deref, so I'm gonna give this a close.

I 100% agree with you that this is a current pain point. The beta cycle is going to be dedicated to polish, and this is high on my list. But I don't want to keep two issues open. Thank you!

@Swatinem
Copy link
Contributor Author

This is #19190 just for reference, thanks!

@steveklabnik
Copy link
Member

Ahh yeah, sorry, I was on mobile and forgot to link it :(

@vi
Copy link
Contributor

vi commented Jan 31, 2015

+1, I have got stopped and fell back to IRC because of this.

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

3 participants