Skip to content

Commit df412ce

Browse files
committed
Change offset to 0
1 parent fa7767e commit df412ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/codemap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ impl CodeMap {
598598
/// If `sp` points to `"let mut x"`, then a span pointing at `"let "` will be returned.
599599
pub fn span_until_non_whitespace(&self, sp: Span) -> Span {
600600
if let Ok(snippet) = self.span_to_snippet(sp) {
601-
let mut offset = 1;
601+
let mut offset = 0;
602602
// get the bytes width of all the non-whitespace characters
603603
for c in snippet.chars().take_while(|c| !c.is_whitespace()) {
604604
offset += c.len_utf8();

0 commit comments

Comments
 (0)