about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2015-01-02 20:55:31 +0900
committerSeo Sanghyeon <sanxiyn@gmail.com>2015-01-02 20:55:31 +0900
commitf2a06f760bee698d3c9e1fe4cad33bf1558e3c78 (patch)
tree29ab839fccc45c7fae5e9765143ec4841f799b94 /src/libsyntax/parse/parser.rs
parentee3c5957eaaf577bff895ce819447f7e40558a28 (diff)
downloadrust-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.rs8
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 {