Skip to content

Clarify Vec::extend_from_slice doc - #151057

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

tbu- wants to merge 1 commit into
rust-lang:mainfrom
tbu-:pr_doc_vec_extendfromslice

Conversation

@tbu-

@tbu- tbu- commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

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

rustbot commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

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 Resolved
@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 Resolved
@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-

tbu- commented Jan 22, 2026

Copy link
Copy Markdown
Contributor Author

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

@joboet

joboet commented Feb 7, 2026

Copy link
Copy Markdown
Member

@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

rustbot commented Feb 7, 2026

Copy link
Copy Markdown
Collaborator

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

rustbot commented Apr 29, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

@JohnCSimon

Copy link
Copy Markdown

@tbu-

Ping from triage: - can you post your status on this PR? This has been open for a bit. and has merge conflicts.

This branch has not been deployed

No deployments
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.

6 participants