Skip to content

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

Closed

Description

@Swatinem

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.

Activity

  1. steveklabnik commented on Jan 28, 2015

    @steveklabnik
    Contributor

    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!

  2. Swatinem commented on Jan 28, 2015

    @Swatinem
    ContributorAuthor

    This is #19190 just for reference, thanks!

  3. steveklabnik commented on Jan 28, 2015

    @steveklabnik
    Contributor

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

  4. vi commented on Jan 31, 2015

    @vi
    Contributor

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

  5. added a commit that references this issue on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions