about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-02-01 12:02:22 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-02-01 12:18:15 -0800
commitdf412ce2083308cbe7c21ce2fc5622bfa8518993 (patch)
treef0f98b58ba493e7fbe131a973f6c88189969aa61 /src/libsyntax
parentfa7767e1ea825bb4cbadbb05c0bfa8ff8a9100e1 (diff)
downloadrust-df412ce2083308cbe7c21ce2fc5622bfa8518993.tar.gz
rust-df412ce2083308cbe7c21ce2fc5622bfa8518993.zip
Change offset to `0`
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/codemap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/codemap.rs b/src/libsyntax/codemap.rs
index fbd9088797e..e980d6e6793 100644
--- a/src/libsyntax/codemap.rs
+++ b/src/libsyntax/codemap.rs
@@ -598,7 +598,7 @@ impl CodeMap {
     /// If `sp` points to `"let mut x"`, then a span pointing at `"let "` will be returned.
     pub fn span_until_non_whitespace(&self, sp: Span) -> Span {
         if let Ok(snippet) = self.span_to_snippet(sp) {
-            let mut offset = 1;
+            let mut offset = 0;
             // get the bytes width of all the non-whitespace characters
             for c in snippet.chars().take_while(|c| !c.is_whitespace()) {
                 offset += c.len_utf8();