-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Relevant to the library team, which will review and decide on the PR/issue.
Description
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.
https://dev-doc.rust-lang.org/1.92.0/releases.html :
iter::Repeat::lastandcountwill now panic, rather than looping infinitely.
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
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: 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.Relevant to the library team, which will review and decide on the PR/issue.