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

Rename slice::take... methods to split_off... #136555

Merged
merged 2 commits into from
Feb 6, 2025
Merged

Conversation

cramertj
Copy link
Member

@cramertj cramertj commented Feb 4, 2025

This rename was discussed and recommended in a recent t-libs meeting.

cc #62280

There's an additional commit here which modifies internals of unstable OneSidedRange APIs in order to implement split_off methods in a panic-free way (remove unreachable!()) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2025

r? @tgross35

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

@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 4, 2025
@tgross35
Copy link
Contributor

tgross35 commented Feb 4, 2025

Discussion for reference https://hackmd.io/xLRjfOA4Twy3_nEzXv7gcQ#nominated-rusttf62280-Tracking-issue-for-slice_take. I'll take a look soon.

@dtolnay dtolnay mentioned this pull request Feb 5, 2025
7 tasks
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.

Thank you!

@dtolnay
Copy link
Member

dtolnay commented Feb 5, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Feb 5, 2025

📌 Commit 836a989 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 Feb 5, 2025
@dtolnay dtolnay assigned dtolnay and unassigned tgross35 Feb 5, 2025
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Feb 5, 2025
Rename `slice::take...` methods to `split_off...`

This rename was discussed and recommended in a recent t-libs meeting.

cc rust-lang#62280

There's an additional commit here which modifies internals of unstable `OneSidedRange` APIs in order to implement `split_off` methods in a panic-free way (remove `unreachable!()`) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Feb 5, 2025
Rename `slice::take...` methods to `split_off...`

This rename was discussed and recommended in a recent t-libs meeting.

cc rust-lang#62280

There's an additional commit here which modifies internals of unstable `OneSidedRange` APIs in order to implement `split_off` methods in a panic-free way (remove `unreachable!()`) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#132547 (cg_gcc: Directly use rustc_abi instead of reexports)
 - rust-lang#135572 (tests: Port `split-debuginfo` to rmake.rs)
 - rust-lang#135964 (Make cenum_impl_drop_cast a hard error)
 - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe})
 - rust-lang#136304 (Reject negative literals for unsigned or char types in pattern ranges and literals)
 - rust-lang#136418 (uefi: process: Add support for command environment variables)
 - rust-lang#136449 (std: move network code into `sys`)
 - rust-lang#136517 (implement inherent str constructors)
 - rust-lang#136536 (Rename and Move some UI tests to more suitable subdirs)
 - rust-lang#136537 (Update `compiler-builtins` to 0.1.145)
 - rust-lang#136555 (Rename `slice::take...` methods to `split_off...`)
 - rust-lang#136567 (Arbitrary self types v2: recursion test)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#132547 (cg_gcc: Directly use rustc_abi instead of reexports)
 - rust-lang#135572 (tests: Port `split-debuginfo` to rmake.rs)
 - rust-lang#135964 (Make cenum_impl_drop_cast a hard error)
 - rust-lang#136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe})
 - rust-lang#136304 (Reject negative literals for unsigned or char types in pattern ranges and literals)
 - rust-lang#136418 (uefi: process: Add support for command environment variables)
 - rust-lang#136449 (std: move network code into `sys`)
 - rust-lang#136517 (implement inherent str constructors)
 - rust-lang#136536 (Rename and Move some UI tests to more suitable subdirs)
 - rust-lang#136537 (Update `compiler-builtins` to 0.1.145)
 - rust-lang#136555 (Rename `slice::take...` methods to `split_off...`)
 - rust-lang#136567 (Arbitrary self types v2: recursion test)

r? `@ghost`
`@rustbot` modify labels: rollup
@@ -83,14 +83,12 @@ pub use raw::{from_raw_parts, from_raw_parts_mut};
/// which to split. Returns `None` if the split index would overflow.
Copy link
Contributor

@thaliaarchi thaliaarchi Feb 6, 2025

Choose a reason for hiding this comment

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

Btw, you missed the take and take_mut in this comment (not able to be shown in the snippet).

@bors bors merged commit fd4623b into rust-lang:master Feb 6, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 6, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
Rollup merge of rust-lang#136555 - cramertj:split_off, r=dtolnay

Rename `slice::take...` methods to `split_off...`

This rename was discussed and recommended in a recent t-libs meeting.

cc rust-lang#62280

There's an additional commit here which modifies internals of unstable `OneSidedRange` APIs in order to implement `split_off` methods in a panic-free way (remove `unreachable!()`) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.
@cramertj cramertj deleted the split_off branch February 6, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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