diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-08-13 11:03:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-13 11:03:13 +0200 |
| commit | 31916ac3988df35b7b28c0479b92fd8b8bc2a8b1 (patch) | |
| tree | 8ea7a6b6a42d9cbf4ad8442ebca80dc82dbbfb3b /src | |
| parent | b1a742794e2e69ef22a6352d310cf60955b8fc3c (diff) | |
| parent | 64503b6ee7e6b861f5c1dc8e27a97cf231b59685 (diff) | |
| download | rust-31916ac3988df35b7b28c0479b92fd8b8bc2a8b1.tar.gz rust-31916ac3988df35b7b28c0479b92fd8b8bc2a8b1.zip | |
Rollup merge of #43822 - topecongiro:missing-span-let, r=petrochenkov
Include 'let' keyword to the span for ast::Local Currently the span for `ast::Local` does not the include the `let` keyword. This PR fixes it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 7bf4c6799b3..15f05df58b5 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3587,7 +3587,7 @@ impl<'a> Parser<'a> { /// Parse a local variable declaration fn parse_local(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Local>> { - let lo = self.span; + let lo = self.prev_span; let pat = self.parse_pat()?; let ty = if self.eat(&token::Colon) { |
