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-13 12:02:16 -0800
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-01-14 18:14:16 -0800
commit5c0d674a45dca39d32e3b30af48e2faf718d43d7 (patch)
tree5305e7bc2cf508915e99b659eefe96921709f6a3 /src/libsyntax/parse
parente1f1a1204ad3a68a90490fcad69ab2c3e6be4086 (diff)
downloadrust-5c0d674a45dca39d32e3b30af48e2faf718d43d7.tar.gz
rust-5c0d674a45dca39d32e3b30af48e2faf718d43d7.zip
convert ast::foreign_item to a struct
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs24
1 files changed, 12 insertions, 12 deletions
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 {