Skip to content

Awkward wording of char slicing error message #38052

Closed
@steveklabnik

Description

@steveklabnik
fn slice_not_on_char_boundaries() {
    let s = "Здравствуйте";
    &s[0..1];
}

gives

thread 'main' panicked at 'index 0 and/or 3 in `Здравствуйте` do not lie on character boundary'

To me, "index do not lie" feels weird, should be "does not lie".

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions