Skip to content
New issue

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

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

Already on GitHub? # to your account

Tracking Issue for *mut [T]::split_at_mut #95595

Open
1 of 3 tasks
the8472 opened this issue Apr 2, 2022 · 3 comments
Open
1 of 3 tasks

Tracking Issue for *mut [T]::split_at_mut #95595

the8472 opened this issue Apr 2, 2022 · 3 comments
Labels
A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-slice Area: `[T]` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@the8472
Copy link
Member

the8472 commented Apr 2, 2022

The feature gate for the issue is #![feature(raw_slice_split)].

This is a tracking issue for the split_at_mut method on raw slice pointers

Public API

impl<T> *mut [T] {
   pub unsafe fn split_at_mut(self, mid: usize) -> (*mut [T], *mut [T]);

   pub unsafe fn split_at_mut_unchecked(self, mid: usize) -> (*mut [T], *mut [T]);
}

Steps / History

Unresolved Questions

  • None yet.
@the8472 the8472 added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC A-slice Area: `[T]` A-raw-pointers Area: raw pointers, MaybeUninit, NonNull labels Apr 2, 2022
@lukas-code
Copy link
Member

Is there any reason why these (and is_empty) only exist for *mut [T] and not *const [T]?

@the8472
Copy link
Member Author

the8472 commented Mar 21, 2023

No particular reason beyond that there only was an immediate motivating use for *mut, not one for *const.

@RalfJung
Copy link
Member

#118231 adds is_empty to const raw pointers; a PR to do the same for the split methods would be welcome. :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-raw-pointers Area: raw pointers, MaybeUninit, NonNull A-slice Area: `[T]` C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants