From 5c0d674a45dca39d32e3b30af48e2faf718d43d7 Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Sun, 13 Jan 2013 12:02:16 -0800 Subject: convert ast::foreign_item to a struct --- src/libsyntax/parse/parser.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/libsyntax/parse/parser.rs') diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2a8014a218c..7d247afaa53 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -3123,12 +3123,12 @@ impl Parser { let (decl, _) = self.parse_fn_decl(|p| p.parse_arg()); let mut hi = self.span.hi; self.expect(token::SEMI); - return @{ident: t.ident, - attrs: attrs, - node: foreign_item_fn(decl, purity, t.tps), - id: self.get_id(), - span: mk_sp(lo, hi), - vis: vis}; + @ast::foreign_item { ident: t.ident, + attrs: attrs, + node: foreign_item_fn(decl, purity, t.tps), + id: self.get_id(), + span: mk_sp(lo, hi), + vis: vis } } fn parse_item_foreign_const(vis: ast::visibility, @@ -3140,12 +3140,12 @@ impl Parser { let ty = self.parse_ty(false); let hi = self.span.hi; self.expect(token::SEMI); - return @{ident: ident, - attrs: attrs, - node: foreign_item_const(move ty), - id: self.get_id(), - span: mk_sp(lo, hi), - vis: vis}; + @ast::foreign_item { ident: ident, + attrs: attrs, + node: foreign_item_const(ty), + id: self.get_id(), + span: mk_sp(lo, hi), + vis: vis } } fn parse_fn_purity() -> purity { -- cgit 1.4.1-3-g733a5