Skip to content

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

Open
@the8472

Description

@the8472
Member

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

  • Final comment period (FCP)
    Stabilization PR

Unresolved Questions

  • None yet.

Activity

added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
A-raw-pointersArea: raw pointers, MaybeUninit, NonNull
on Apr 2, 2022
lukas-code

lukas-code commented on Mar 21, 2023

@lukas-code
Member

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

the8472

the8472 commented on Mar 21, 2023

@the8472
MemberAuthor

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

RalfJung

RalfJung commented on Nov 24, 2023

@RalfJung
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-raw-pointersArea: raw pointers, MaybeUninit, NonNullA-sliceArea: `[T]`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @RalfJung@the8472@lukas-code

        Issue actions

          Tracking Issue for `*mut [T]::split_at_mut` · Issue #95595 · rust-lang/rust