Skip to content

Document Repeat::last panic behavior#157323

Open
majiayu000 wants to merge 1 commit into
rust-lang:mainfrom
majiayu000:docs-repeat-last-panic
Open

Document Repeat::last panic behavior#157323
majiayu000 wants to merge 1 commit into
rust-lang:mainfrom
majiayu000:docs-repeat-last-panic

Conversation

@majiayu000
Copy link
Copy Markdown
Contributor

@majiayu000 majiayu000 commented Jun 2, 2026

Fixes #149707

Documents that Repeat::last always panics because Repeat is infinite.

Tests:

  • ./x fmt --check
  • ./x doc library/core
  • ./x test library/core

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 2, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 2, 2026

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 8 candidates
  • Random selection from LawnGnome, Mark-Simulacrum, jhpratt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document panic! for Iterator::last (Repeat)

3 participants