From 5ba7e55a4c42f6a53eccb60d4098b9422dd6e345 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Tue, 15 Jan 2013 15:03:49 -0800 Subject: convert ast::{ty_field_,ty_method} into a struct --- src/libsyntax/parse/parser.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') 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 }, } ) } -- cgit 1.4.1-3-g733a5