diff options
| author | Seo Sanghyeon <sanxiyn@gmail.com> | 2015-01-02 20:55:31 +0900 |
|---|---|---|
| committer | Seo Sanghyeon <sanxiyn@gmail.com> | 2015-01-02 20:55:31 +0900 |
| commit | f2a06f760bee698d3c9e1fe4cad33bf1558e3c78 (patch) | |
| tree | 29ab839fccc45c7fae5e9765143ec4841f799b94 /src/libsyntax/parse/parser.rs | |
| parent | ee3c5957eaaf577bff895ce819447f7e40558a28 (diff) | |
| download | rust-f2a06f760bee698d3c9e1fe4cad33bf1558e3c78.tar.gz rust-f2a06f760bee698d3c9e1fe4cad33bf1558e3c78.zip | |
Make type in ast::Local optional
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 457085f5cc8..c7327a24bb6 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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 { |
