about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-20 10:40:09 +0000
committerbors <bors@rust-lang.org>2022-10-20 10:40:09 +0000
commit53728ff751df4c271d4ea565b6871057a3504fc5 (patch)
tree554ce71e5e7e9b3f2f951f23fb017c36339d7d94 /compiler/rustc_errors/src/lib.rs
parent4b3b731b55a588dd34a75bbb87fdaaec2e3f5707 (diff)
parenteb8aa9759dc99b604145f94e5296b7add60e0a48 (diff)
downloadrust-53728ff751df4c271d4ea565b6871057a3504fc5.tar.gz
rust-53728ff751df4c271d4ea565b6871057a3504fc5.zip
Auto merge of #103185 - chenyukang:yukang/fix-span-next-point, r=davidtwco
Fix the bug of next_point in source_map

There is a bug in `next_point`, the new span won't move to next position when be called in the first time.

For this reason, our current code is working like this:
1. When we really want to move to the next position, we called two times of `next_point`
2. Some code which use `next_point` actually done the same thing with `shrink_to_hi`

This fix make sure when `next_point` is called, span will move with the width at least 1, and also work correctly in the scenario of multiple bytes.

Ref: https://github.com/rust-lang/rust/pull/103140#discussion_r997710998

r? `@davidtwco`
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
0 files changed, 0 insertions, 0 deletions