Implement `From<{&,&mut} [T; N]>` for `Vec<T>` where `T: Clo...
source link: https://github.com/rust-lang/rust/pull/111278
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Currently, if T
implements Clone
, we can create a Vec<T>
from an &[T]
or an &mut [T]
, can we also support creating a Vec<T>
from an &[T; N]
or an &mut [T; N]
? Also, do I need to add #[inline]
to the implementation?
ACP: rust-lang/libs-team#220. [Accepted]
Closes #100880.
Collaborator
(rustbot has picked a reviewer for you, use r? to override) |
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
Collaborator
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
changed the title
Implement From<{&,&mut} [T; N]>
for Vec<T>
Implement From<{&,&mut} [T; N]>
for Vec<T>
where T: Clone
added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label
Contributor
Author
@rustbot ready |
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label).
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
added S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete.
and removed S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label).
labels
Contributor
☔ The latest upstream changes (presumably #113113) made this pull request unmergeable. Please resolve the merge conflicts. |
added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label
This comment has been minimized.
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
r? @Amanieu -- rust-lang/libs-team#220 (comment) seems to be an accept, but I think this is insta-stable, right? So I was expecting an FCP not just a meeting discussion. |
Member
We already accepted the ACP for this. @rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it.
labels
added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label
🔔 This is now entering its final comment period, as per the review above. 🔔 |
removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label
added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting
and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised.
labels
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
Thanks!
Member
@bors r+ |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
☀️ Test successful - checks-actions |
Collaborator
Finished benchmarking commit (aeaa5c3): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 631.789s -> 631.947s (0.03%) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
Implement From<&[T; N]>
and From<&mut [T; N]>
for Vec<T>
where T: Clone
?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK