Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hir_typeck: use
end_point
over BytePos
manipulations
Parser has error recovery for Unicode-confusables, which includes the right parentheses `)`. If a multi-byte right parentheses look-alike reaches the argument removal suggestion diagnostics, it would trigger an assertion because the diagnostics used `- BytePos(1)` which can land within a multi-byte codepoint. This is fixed by using `SourceMap::end_point` to find the final right delimiter codepoint, which correctly respects codepoint boundaries.
- Loading branch information