Add a semicolon to span for ast::Local
This commit is contained in:
parent
ed1cffdb21
commit
14c6c11904
@ -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,
|
||||
}))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user