From 492677ec1e4e66a57a2fce78962db2f89932dd74 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 19 Nov 2013 12:21:21 -0800 Subject: libsyntax: Change all uses of `&fn` to `||`. --- src/libsyntax/ast_map.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libsyntax/ast_map.rs') 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(&self, f: &fn(Option<&[Attribute]>) -> T) -> T { + pub fn with_attrs(&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(items: map, id: NodeId, - query: &fn(@item) -> Result, - error_msg: ~str) -> Result { +pub fn node_item_query(items: map, id: NodeId, query: |@item| -> Result, error_msg: ~str) + -> Result { match items.find(&id) { Some(&node_item(it, _)) => query(it), _ => fail!("{}", error_msg) -- cgit 1.4.1-3-g733a5