Skip to content

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

@Swatinem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions