Skip to content

Commit 31916ac

Browse files
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.
2 parents b1a7427 + 64503b6 commit 31916ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libsyntax/parse/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ impl<'a> Parser<'a> {
35873587

35883588
/// Parse a local variable declaration
35893589
fn parse_local(&mut self, attrs: ThinVec<Attribute>) -> PResult<'a, P<Local>> {
3590-
let lo = self.span;
3590+
let lo = self.prev_span;
35913591
let pat = self.parse_pat()?;
35923592

35933593
let ty = if self.eat(&token::Colon) {

0 commit comments

Comments
 (0)