Skip to content

Document the behavior of creating empty subslice at end of slice #60783

Closed
@sunfishcode

Description

@sunfishcode

Creating an empty subslice at the end of a slice succeeds: &slice[slice.len()..], however this doesn't appear to be documented in the slice documentation.

From some searching, I found efforts to document this behavior, including #32183, however this documentation doesn't seem to appear in slice's doc page or the index function's doc page.

The place I originally looked was on slice's get function.

This might be related to rustdoc omitting some documentation, however #31821 (comment) says to file specific issues, so here's a specific issue :-).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-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

    Issue actions