Skip to content

Conversation

@Riahiamirreza
Copy link

I think there's a small typo in docs, just wanted to fix it.

@rustbot
Copy link
Collaborator

rustbot commented Feb 15, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cuviper (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

@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 Feb 15, 2024
@Noratrieb
Copy link
Member

Hi, thank you for the PR! This is not a type, what it means is that out of all the methods in the standard library, collect belongs to those that are more powerful than many other methods which are less powerful. I don't think "most" is more appropriate, but I do agree that the wording is not great. What do you think about just deleting this sentence?
The previous sentence is also not great, the word "iterable" is often used to refer to implementors of IntoIterator (which is called Iterable in Java, for example), but collect takes an iterator. Maybe that sentence could be deleted too, but I don't think it's entirely useless either. What do you think?

@Noratrieb Noratrieb added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 15, 2024
@saethlin
Copy link
Member

This is not a type

cough cough

@JohnCSimon
Copy link
Member

@Riahiamirreza

Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you are going to continue please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Apr 14, 2024
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Apr 14, 2024
@He1pa
Copy link
Contributor

He1pa commented Jun 25, 2024

Hi, thank you for the PR! This is not a type, what it means is that out of all the methods in the standard library, collect belongs to those that are more powerful than many other methods which are less powerful. I don't think "most" is more appropriate, but I do agree that the wording is not great. What do you think about just deleting this sentence? The previous sentence is also not great, the word "iterable" is often used to refer to implementors of IntoIterator (which is called Iterable in Java, for example), but collect takes an iterator. Maybe that sentence could be deleted too, but I don't think it's entirely useless either. What do you think?

How about deleting the second sentence and changing the first sentence to collect() can take any iterator and turn it into the relevant collection.?

Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on rust-lang#121140
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 11, 2026
Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on rust-lang#121140
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 11, 2026
Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on rust-lang#121140
rust-timer added a commit that referenced this pull request Jan 11, 2026
Rollup merge of #150743 - docs/iterator, r=Mark-Simulacrum

Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on #121140
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jan 12, 2026
Reword the collect() docs

Update the `Iterator::collect` docs so they explain that the return type, not the iterator itself, determines which collection is built.

Follow up on rust-lang/rust#121140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

7 participants