We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
next_point
1 parent 9b23f7c commit 28e0b42Copy full SHA for 28e0b42
src/libsyntax_pos/source_map.rs
@@ -739,7 +739,7 @@ impl SourceMap {
739
pub fn next_point(&self, sp: Span) -> Span {
740
let start_of_next_point = sp.hi().0;
741
742
- let width = self.find_width_of_character_at_span(sp, true);
+ let width = self.find_width_of_character_at_span(sp.shrink_to_hi(), true);
743
// If the width is 1, then the next span should point to the same `lo` and `hi`. However,
744
// in the case of a multibyte character, where the width != 1, the next span should
745
// span multiple bytes to include the whole character.
0 commit comments