]> git.lizzy.rs Git - rust.git/commitdiff
Allow nullary tag names to be qualified
authorTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 01:01:42 +0000 (17:01 -0800)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Thu, 19 Jan 2012 05:29:02 +0000 (21:29 -0800)
src/comp/syntax/parse/parser.rs

index 174851c4fcbf30a975e6832f76eb7edd6b9416c5..e0b00d65f70e3459dede2d9ed5f4c10ccadb1ce9 100644 (file)
@@ -1493,10 +1493,9 @@ fn parse_pat(p: parser) -> @ast::pat {
                         }
                         _ { true }
                       } {
-            hi = p.span.hi;
-            let name = parse_value_ident(p);
+            let name = parse_path(p);
             let sub = eat(p, token::AT) ? some(parse_pat(p)) : none;
-            pat = ast::pat_ident(ident_to_path(mk_sp(lo, hi), name), sub);
+            pat = ast::pat_ident(name, sub);
         } else {
             let tag_path = parse_path_and_ty_param_substs(p, true);
             hi = tag_path.span.hi;