Make type in ast::Local optional
This commit is contained in:
parent
ee3c5957ea
commit
f2a06f760b
11 changed files with 31 additions and 28 deletions
|
@ -3627,13 +3627,9 @@ impl<'a> Parser<'a> {
|
|||
let lo = self.span.lo;
|
||||
let pat = self.parse_pat();
|
||||
|
||||
let mut ty = P(Ty {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
node: TyInfer,
|
||||
span: mk_sp(lo, lo),
|
||||
});
|
||||
let mut ty = None;
|
||||
if self.eat(&token::Colon) {
|
||||
ty = self.parse_ty_sum();
|
||||
ty = Some(self.parse_ty_sum());
|
||||
}
|
||||
let init = self.parse_initializer();
|
||||
P(ast::Local {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue