Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loosen From<&[T]> for Box<[T]> bound to T: Clone #103406

Merged
merged 2 commits into from
Apr 30, 2023

Conversation

Jules-Bertholet
Copy link
Contributor

Also loosens From<Cow<'_, [T]>> for Box<[T]>'s bound.

Discussion on Zulip

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Oct 22, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 22, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Collaborator

r? @thomcc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 22, 2022
@Jules-Bertholet
Copy link
Contributor Author

@rustbot label +T-libs-api -T-libs

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 22, 2022
@thomcc thomcc added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label Oct 22, 2022
@thomcc
Copy link
Member

thomcc commented Oct 22, 2022

Needs FCP.

r? @m-ou-se

@rust-highfive rust-highfive assigned m-ou-se and unassigned thomcc Oct 22, 2022
@m-ou-se
Copy link
Member

m-ou-se commented Dec 30, 2022

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Dec 30, 2022

Team member @m-ou-se 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.

@rfcbot rfcbot 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 Dec 30, 2022
@m-ou-se m-ou-se added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 30, 2022
@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jan 7, 2023
@rfcbot
Copy link

rfcbot commented Jan 7, 2023

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot 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 Jan 17, 2023
@rfcbot
Copy link

rfcbot commented Jan 17, 2023

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.

@dtolnay dtolnay assigned dtolnay and unassigned m-ou-se Jan 17, 2023
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dtolnay dtolnay 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-fcp Status: PR is in FCP and is awaiting for FCP to complete. labels Jan 17, 2023
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jan 19, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 27, 2023

Hi @Jules-Bertholet, it's been a while - are you still planning to work on this? Do you know how to make progress? Feel free to ask for help here or on Zulip if you get stuck.

@Jules-Bertholet Jules-Bertholet force-pushed the from_clone_slice_to_box branch from b0f2d6f to 075ee26 Compare April 27, 2023 03:41
@Jules-Bertholet
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot 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 Apr 27, 2023
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me but it should probably have a T-libs reviewer, especially to double-check the specialization.

Co-authored-by: David Tolnay <[email protected]>
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dtolnay
Copy link
Member

dtolnay commented Apr 29, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 29, 2023

📌 Commit 18d2c60 has been approved by dtolnay

It is now in the queue for this repository.

@bors bors 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 Apr 29, 2023
@bors
Copy link
Contributor

bors commented Apr 30, 2023

⌛ Testing commit 18d2c60 with merge 831c929...

Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 30, 2023
…o_box, r=dtolnay

Loosen `From<&[T]> for Box<[T]>` bound to `T: Clone`

Also loosens `From<Cow<'_, [T]>> for Box<[T]>`'s bound.

[Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/From.3C.26.5BT.5D.3E.20impls.20consistency)
@bors
Copy link
Contributor

bors commented Apr 30, 2023

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 831c929 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 30, 2023
@bors bors merged commit 831c929 into rust-lang:master Apr 30, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 30, 2023
@Jules-Bertholet Jules-Bertholet deleted the from_clone_slice_to_box branch April 30, 2023 17:00
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (831c929): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.2% [0.5%, 2.0%] 2
Regressions ❌
(secondary)
6.1% [6.1%, 6.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [0.5%, 2.0%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.