Skip to content

No unsafe slicing #19901

@cgaebel

Description

@cgaebel
Contributor

There's currently no version of slice, slice_from, slice_to, slice_mut, slice_from_mut, slice_to_mut, split_at that doesn't bounds check.

Activity

kmcallister

kmcallister commented on Jan 16, 2015

@kmcallister
Contributor

Is this still the case? It seems like a pretty big oversight if we claim to have C-like performance.

Nominating P-high, not 1.0.

cgaebel

cgaebel commented on Jan 16, 2015

@cgaebel
ContributorAuthor

This appears to still be the case.

pnkfelix

pnkfelix commented on Jan 22, 2015

@pnkfelix
Member

P-low, not 1.0; tagging as wishlist.

nikomatsakis

nikomatsakis commented on Jan 22, 2015

@nikomatsakis
Contributor

This is easy to workaround, so it doesn't seem especially high priority, but it would be nice to have.

steveklabnik

steveklabnik commented on Jan 22, 2015

@steveklabnik
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#708

added a commit that references this issue on Jun 9, 2025
ae8e361
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-collectionsArea: `std::collections`P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@cgaebel@nikomatsakis@pnkfelix@kmcallister

        Issue actions

          No unsafe slicing · Issue #19901 · rust-lang/rust