We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0
1 parent fa7767e commit df412ceCopy full SHA for df412ce
src/libsyntax/codemap.rs
@@ -598,7 +598,7 @@ impl CodeMap {
598
/// If `sp` points to `"let mut x"`, then a span pointing at `"let "` will be returned.
599
pub fn span_until_non_whitespace(&self, sp: Span) -> Span {
600
if let Ok(snippet) = self.span_to_snippet(sp) {
601
- let mut offset = 1;
+ let mut offset = 0;
602
// get the bytes width of all the non-whitespace characters
603
for c in snippet.chars().take_while(|c| !c.is_whitespace()) {
604
offset += c.len_utf8();
0 commit comments