Skip to content

Reduce use of span.with_lo(span.lo() + BytePos(1)) in librustc_parse/parser/mod.rs #68783

Closed
@JohnTitor

Description

@JohnTitor

span.with_lo(span.lo() + BytePos(1)) may cause an ICE if span points strange character so we should use next_point instead. But next_point isn't actually equivalent with span.with_lo(span.lo() + BytePos(1)) so it breaks some spans in current diagnostics. We should find out the cause and reduce use of them.

See context: #68735 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parserArea: The lexing & parsing of Rust source code to an ASTC-cleanupCategory: PRs that clean code up or issues documenting cleanup.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