Skip to content

Unchecked indexing/slicing methods should point towards their safe counterparts #39911

Closed
@jonas-schievink

Description

@jonas-schievink

The following unsafe unchecked indexing / slicing methods don't refer to the safe alternatives at all, misleading newbies into thinking that they are the preferred way of performing that operation. There should be a big disclaimer stating what their checked counterparts are and that they are preferred.

  • str::slice_unchecked / str::slice_mut_unchecked
  • [T]::get_unchecked / [T]::get_unchecked_mut

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions