Skip to content

Conversation

@AngelicosPhosphoros
Copy link
Contributor

Also adds guarantee that fn take() doesn't take more than n elements.

Also adds guarantee that `fn take()` doesn't take more than n elements.
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

r? @ibraheemdev

rustbot has assigned @ibraheemdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 19, 2025

⚠️ Warning ⚠️

@workingjubilee
Copy link
Member

@the8472 Is there some obscure specialization we have that depends on not holding this guarantee?

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@the8472
Copy link
Member

the8472 commented Jun 19, 2025

It's not true in general, even without specialization. Take implements DoubleEndedIterator and next_back will have to go over all the excess elements before yielding an element.

@AngelicosPhosphoros AngelicosPhosphoros deleted the angelicos_phosphoros/add_docs_to_iterator_take branch June 19, 2025 22:35
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.

6 participants