rust/compiler/rustc_span/src
bors 53728ff751 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`
2022-10-20 10:40:09 +00:00
..
analyze_source_file remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
lev_distance Improve method name suggestions 2022-04-03 16:38:57 +01:00
source_map Add testcase for next_point, fix more trivial issues in find_width_of_character_at_span 2022-10-19 21:08:00 +08:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs Fix some clippy lints 2020-12-03 17:08:19 -05:00
caching_source_map_view.rs Convert debug_assert to assert in CachingSourceMapView 2021-09-17 12:01:29 -05:00
def_id.rs Manually order DefId on 64-bit big-endian 2022-09-27 15:21:31 -07:00
edition.rs Create 2024 edition 2022-04-02 02:45:49 -04:00
fatal_error.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
hygiene.rs ssa: implement #[collapse_debuginfo] 2022-09-07 13:54:51 +01:00
lev_distance.rs Improve method name suggestions 2022-04-03 16:38:57 +01:00
lib.rs Add missing documentation for FileNameDisplayPreference variants 2022-10-09 23:32:15 +02:00
profiling.rs extend EventArgRecorder into span-aware SpannedEventArgRecorder 2022-04-22 18:06:21 +02:00
source_map.rs Add testcase for next_point, fix more trivial issues in find_width_of_character_at_span 2022-10-19 21:08:00 +08:00
span_encoding.rs Make names more explicit. 2022-08-17 19:20:28 +02:00
symbol.rs Make diagnostic for unsatisfied Termination bounds more precise 2022-10-17 12:08:46 +02:00
tests.rs Lazify SourceFile::lines. 2022-06-01 10:36:39 +10:00