Skip to content

Clarify Vec::extend_from_slice doc#151057

Open
tbu- wants to merge 1 commit intorust-lang:mainfrom
tbu-:pr_doc_vec_extendfromslice
Open

Clarify Vec::extend_from_slice doc#151057
tbu- wants to merge 1 commit intorust-lang:mainfrom
tbu-:pr_doc_vec_extendfromslice

Conversation

@tbu-
Copy link
Copy Markdown
Contributor

@tbu- tbu- commented Jan 13, 2026

Calling vec.extend(slice.iter().cloned()) calls the same code thanks to specialization.

I don't know of any plans to deprecate this method.

@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 Jan 13, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jan 13, 2026

r? @joboet

rustbot has assigned @joboet.
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

@JayanAXHF JayanAXHF added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jan 13, 2026
Comment thread library/alloc/src/vec/mod.rs Outdated
@tbu- tbu- force-pushed the pr_doc_vec_extendfromslice branch from 74bc6c2 to 77a2782 Compare January 13, 2026 17:09
@JayanAXHF JayanAXHF added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jan 13, 2026
Comment thread library/alloc/src/vec/mod.rs
@tbu- tbu- force-pushed the pr_doc_vec_extendfromslice branch from 77a2782 to e82cec8 Compare January 22, 2026 14:03
@rust-log-analyzer

This comment has been minimized.

@tbu-
Copy link
Copy Markdown
Contributor Author

tbu- commented Jan 22, 2026

Hmm, that fails the run. I guess I have to investigate a little more.

@joboet
Copy link
Copy Markdown
Member

joboet commented Feb 7, 2026

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 7, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rustbot rustbot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 7, 2026
…from_slice`

Remove the template parameter `T` from `SpecExtend`. It was previously
only used to create a second trait hierarchy just for
`Vec::extend_from_slice`.

Calling `vec.extend(slice.iter().cloned())` now calls the same code
thanks to specialization.

I don't know of any plans to deprecate this method.
@tbu- tbu- force-pushed the pr_doc_vec_extendfromslice branch from e82cec8 to 034a149 Compare April 29, 2026 11:35
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 29, 2026

⚠️ Warning ⚠️

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

Labels

A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. 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.

5 participants