about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-10-20 16:33:59 -0700
committerBrian Anderson <banderson@mozilla.com>2012-10-20 17:50:46 -0700
commitf3df50f67f2aa6dbdc3e4c35d6eb2ba8e6b37eed (patch)
tree3217f87f731e90da0628f30171777d06204ba913 /src/libsyntax/parse/parser.rs
parent41c37d9d0f4bd8ee7f711d47d93e08e5687de3b4 (diff)
downloadrust-f3df50f67f2aa6dbdc3e4c35d6eb2ba8e6b37eed.tar.gz
rust-f3df50f67f2aa6dbdc3e4c35d6eb2ba8e6b37eed.zip
Parse and report obsolete fixed-length vector syntax
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 879df19f11a..1ee683bdd08 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -553,9 +553,13 @@ impl Parser {
         } else { self.fatal(~"expected type"); };
 
         let sp = mk_sp(lo, self.last_span.hi);
-        return @{id: self.get_id(),
-              node: t,
+        return {
+            let node =
+                self.try_convert_ty_to_obsolete_fixed_length_vstore(sp, t);
+            @{id: self.get_id(),
+              node: node,
               span: sp}
+        };
     }
 
     fn parse_arg_mode() -> mode {
@@ -1061,6 +1065,9 @@ impl Parser {
             ex = expr_lit(@lit);
         }
 
+        let (hi, ex) =
+            self.try_convert_expr_to_obsolete_fixed_length_vstore(lo, hi, ex);
+
         return self.mk_pexpr(lo, hi, ex);
     }