about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-01-15 15:03:49 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-20 14:08:18 -0800
commit5ba7e55a4c42f6a53eccb60d4098b9422dd6e345 (patch)
treee14c312fe4142afe1528c43f0e306a8a61244864 /src/libsyntax/parse
parent8cdc3fda11b2e341f305c03678a04c6bb01ce635 (diff)
downloadrust-5ba7e55a4c42f6a53eccb60d4098b9422dd6e345.tar.gz
rust-5ba7e55a4c42f6a53eccb60d4098b9422dd6e345.zip
convert ast::{ty_field_,ty_method} into a struct
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 2db9cdf3c30..b4fbd9beae3 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -421,10 +421,16 @@ impl Parser {
                 debug!("parse_trait_methods(): parsing required method");
                 // NB: at the moment, visibility annotations on required
                 // methods are ignored; this could change.
-                required({ident: ident, attrs: attrs,
-                          purity: pur, decl: d, tps: tps,
-                          self_ty: self_ty,
-                          id: p.get_id(), span: mk_sp(lo, hi)})
+                required(ty_method {
+                    ident: ident,
+                    attrs: attrs,
+                    purity: pur,
+                    decl: d,
+                    tps: tps,
+                    self_ty: self_ty,
+                    id: p.get_id(),
+                    span: mk_sp(lo, hi)
+                })
               }
               token::LBRACE => {
                 debug!("parse_trait_methods(): parsing provided method");
@@ -467,9 +473,9 @@ impl Parser {
         spanned(
             lo,
             ty.span.hi,
-            {
+            ast::ty_field_ {
                 ident: id,
-                mt: ast::mt { ty: ty, mutbl: mutbl }
+                mt: ast::mt { ty: ty, mutbl: mutbl },
             }
         )
     }