about summary refs log tree commit diff
path: root/src/libsyntax/ext/auto_encode.rs
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-01-13 10:48:09 -0800
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2013-01-14 18:14:16 -0800
commitbea67bde21d36df40c55b02cd8d8b28c0ec864b6 (patch)
tree4970407fc9c5b4662e315e9fe66281cfa6a93c44 /src/libsyntax/ext/auto_encode.rs
parent1be4bfb8ccfd6a91fe63cc2808f3c5e9177d52dd (diff)
downloadrust-bea67bde21d36df40c55b02cd8d8b28c0ec864b6.tar.gz
rust-bea67bde21d36df40c55b02cd8d8b28c0ec864b6.zip
Change ast::path into a struct.
Diffstat (limited to 'src/libsyntax/ext/auto_encode.rs')
-rw-r--r--src/libsyntax/ext/auto_encode.rs36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/libsyntax/ext/auto_encode.rs b/src/libsyntax/ext/auto_encode.rs
index 4afd2e1f7f8..bc28e836802 100644
--- a/src/libsyntax/ext/auto_encode.rs
+++ b/src/libsyntax/ext/auto_encode.rs
@@ -264,21 +264,45 @@ priv impl ext_ctxt {
     }
 
     fn path(span: span, strs: ~[ast::ident]) -> @ast::path {
-        @{span: span, global: false, idents: strs, rp: None, types: ~[]}
+        @ast::path {
+            span: span,
+            global: false,
+            idents: strs,
+            rp: None,
+            types: ~[]
+        }
     }
 
     fn path_global(span: span, strs: ~[ast::ident]) -> @ast::path {
-        @{span: span, global: true, idents: strs, rp: None, types: ~[]}
+        @ast::path {
+            span: span,
+            global: true,
+            idents: strs,
+            rp: None,
+            types: ~[]
+        }
     }
 
     fn path_tps(span: span, strs: ~[ast::ident],
                 tps: ~[@ast::Ty]) -> @ast::path {
-        @{span: span, global: false, idents: strs, rp: None, types: tps}
+        @ast::path {
+            span: span,
+            global: false,
+            idents: strs,
+            rp: None,
+            types: tps
+        }
     }
 
     fn path_tps_global(span: span, strs: ~[ast::ident],
                        tps: ~[@ast::Ty]) -> @ast::path {
-        @{span: span, global: true, idents: strs, rp: None, types: tps}
+        @ast::path {
+            span: span,
+            global: true,
+            idents: strs,
+            rp: None,
+            types: tps
+        }
     }
 
     fn ty_path(span: span, strs: ~[ast::ident],
@@ -289,11 +313,9 @@ priv impl ext_ctxt {
     }
 
     fn binder_pat(span: span, nm: ast::ident) -> @ast::pat {
-        let path = @{span: span, global: false, idents: ~[nm],
-                     rp: None, types: ~[]};
         @{id: self.next_id(),
           node: ast::pat_ident(ast::bind_by_ref(ast::m_imm),
-                               path,
+                               self.path(span, ~[nm]),
                                None),
           span: span}
     }