-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Conversation
Discussion for reference https://hackmd.io/xLRjfOA4Twy3_nEzXv7gcQ#nominated-rusttf62280-Tracking-issue-for-slice_take. I'll take a look soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@bors r+ |
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.
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.
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
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. |
There was a problem hiding this comment.
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).
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.
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 implementsplit_off
methods in a panic-free way (removeunreachable!()
) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.