Skip to content

Commit

Permalink
Add a semicolon to span for ast::Local
Browse files Browse the repository at this point in the history
  • Loading branch information
topecongiro committed Oct 6, 2017
1 parent ed1cffd commit 14c6c11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3671,12 +3671,17 @@ impl<'a> Parser<'a> {
None
};
let init = self.parse_initializer()?;
let hi = if self.token == token::Semi {
self.span
} else {
self.prev_span
};
Ok(P(ast::Local {
ty,
pat,
init,
id: ast::DUMMY_NODE_ID,
span: lo.to(self.prev_span),
span: lo.to(hi),
attrs,
}))
}
Expand Down

0 comments on commit 14c6c11

Please sign in to comment.