Skip to content

Document panic! for Iterator::last (Repeat) #149707

@tdelmas

Description

@tdelmas

Location (URL)

https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.last
https://doc.rust-lang.org/std/iter/struct.Repeat.html#method.last

Summary

https://doc.rust-lang.org/src/core/iter/sources/repeat.rs.html#105

This panic! added in rust 1.92 is not documented. Neither in Iterator::last nor in repeat.

#146410

https://dev-doc.rust-lang.org/1.92.0/releases.html :

count does document the panic! in Iterator Iterator::count in std::iter but last didn't.

I think this panic! should be documented both in the Iterator trait and in the Repeat implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions