Reduce use of span.with_lo(span.lo() + BytePos(1))
in librustc_parse/parser/mod.rs
#68783
Labels
A-parser
Area: The parsing of Rust source code to an AST
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
span.with_lo(span.lo() + BytePos(1))
may cause an ICE if span points strange character so we should usenext_point
instead. Butnext_point
isn't actually equivalent withspan.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)
The text was updated successfully, but these errors were encountered: