Skip to content

Glossary string slice entry is outdated #2407

Open

Description

@DanielEScherzer

Strings slices are always valid UTF-8.

compare with #792, prompted by rust-lang/rust#134598

Activity

  1. DanielEScherzer commented on Nov 10, 2026

    @DanielEScherzer
    ContributorAuthor

    From the lang docs call today, TC pointed out that https://doc.rust-lang.org/reference/type-layout.html#r-layout.str should probably also be updated

    String slices are a UTF-8 representation of characters that have the same layout as slices of type [u8]. A reference &str has the same layout as a reference &[u8].

    Second sentence is fine, but the first one suggests that they are always UTF-8 even though they aren't

  2. DanielEScherzer commented on Nov 10, 2026

    @DanielEScherzer
    ContributorAuthor

    @TriageBot label +A-glossary +A-type-layout

  3. added
    A-glossary
    A-type-layout
    on Nov 10, 2026
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-glossaryA-type-layout

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions