about summary refs log tree commit diff
path: root/src/libsyntax/ast_map.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:21:21 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:40:19 -0800
commit492677ec1e4e66a57a2fce78962db2f89932dd74 (patch)
tree7215ca2d3af530efb17aee207f95365ca374ac00 /src/libsyntax/ast_map.rs
parent18a30aff4564437ccd2698be367ca98c81122ac0 (diff)
downloadrust-492677ec1e4e66a57a2fce78962db2f89932dd74.tar.gz
rust-492677ec1e4e66a57a2fce78962db2f89932dd74.zip
libsyntax: Change all uses of `&fn` to `||`.
Diffstat (limited to 'src/libsyntax/ast_map.rs')
-rw-r--r--src/libsyntax/ast_map.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs
index f3d7ac1804d..c5ad3714917 100644
--- a/src/libsyntax/ast_map.rs
+++ b/src/libsyntax/ast_map.rs
@@ -122,7 +122,7 @@ pub enum ast_node {
 }
 
 impl ast_node {
-    pub fn with_attrs<T>(&self, f: &fn(Option<&[Attribute]>) -> T) -> T {
+    pub fn with_attrs<T>(&self, f: |Option<&[Attribute]>| -> T) -> T {
         let attrs = match *self {
             node_item(i, _) => Some(i.attrs.as_slice()),
             node_foreign_item(fi, _, _, _) => Some(fi.attrs.as_slice()),
@@ -480,9 +480,8 @@ pub fn node_id_to_str(map: map, id: NodeId, itr: @ident_interner) -> ~str {
     }
 }
 
-pub fn node_item_query<Result>(items: map, id: NodeId,
-                               query: &fn(@item) -> Result,
-                               error_msg: ~str) -> Result {
+pub fn node_item_query<Result>(items: map, id: NodeId, query: |@item| -> Result, error_msg: ~str)
+                       -> Result {
     match items.find(&id) {
         Some(&node_item(it, _)) => query(it),
         _ => fail!("{}", error_msg)