diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-08-09 05:01:27 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-08-09 05:04:51 +0000 |
| commit | 879bfd7ad0f5f79e7bc90320dfb80dfabe91ac2b (patch) | |
| tree | 4bfc5a2bf6dbd2c5bbf91a4a9f71958b21b9b385 /compiler/rustc_codegen_llvm/src | |
| parent | b589f86a09c823208cbe95755f0cb0883e28d0de (diff) | |
| download | rust-879bfd7ad0f5f79e7bc90320dfb80dfabe91ac2b.tar.gz rust-879bfd7ad0f5f79e7bc90320dfb80dfabe91ac2b.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
