Skip to content

\u{00ad} character is sometimes parsed twice #77417

Closed
@bugadani

Description

@bugadani

See here: https://godbolt.org/z/sdv7a3

The println! outputs "f\u{ad}\u{ad}cali" - this isn't a println! issue, but the string literal also contains 2 \u{ad} characters.

Same example, but a little more visible: the following assert is supposed to pass:

assert_eq!(6, "f\u{AD}­cali".chars().count());

Issue exists since 1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.T-compilerRelevant to the compiler 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