diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-02-01 12:02:22 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-02-01 12:18:15 -0800 |
| commit | df412ce2083308cbe7c21ce2fc5622bfa8518993 (patch) | |
| tree | f0f98b58ba493e7fbe131a973f6c88189969aa61 /src/libsyntax | |
| parent | fa7767e1ea825bb4cbadbb05c0bfa8ff8a9100e1 (diff) | |
| download | rust-df412ce2083308cbe7c21ce2fc5622bfa8518993.tar.gz rust-df412ce2083308cbe7c21ce2fc5622bfa8518993.zip | |
Change offset to `0`
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/codemap.rs | 2 |
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(); |
