about summary refs log tree commit diff
path: root/src/comp/syntax/print/pprust.rs
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2012-01-11 09:58:05 -0800
committerNiko Matsakis <niko@alum.mit.edu>2012-01-13 06:27:34 -0800
commit455f8b0d4588b6d890ce8a908d488c0325e3f29e (patch)
tree9da702ded644a4d6eabe0936949060ca0ecc1c9d /src/comp/syntax/print/pprust.rs
parentd2be5b6c7a20b8b33f61cd0db4a3cbbdd7a5448a (diff)
downloadrust-455f8b0d4588b6d890ce8a908d488c0325e3f29e.tar.gz
rust-455f8b0d4588b6d890ce8a908d488c0325e3f29e.zip
deprecate fn exprs and the fn() type, preferring fn@ and native fn
Diffstat (limited to 'src/comp/syntax/print/pprust.rs')
-rw-r--r--src/comp/syntax/print/pprust.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 6de712e14be..6c5fd6b0354 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -194,7 +194,7 @@ fn synth_comment(s: ps, text: str) {
     word(s.s, "*/");
 }
 
-fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: fn(ps, IN)) {
+fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: block(ps, IN)) {
     box(s, 0u, b);
     let first = true;
     for elt: IN in elts {
@@ -205,8 +205,8 @@ fn commasep<IN>(s: ps, b: breaks, elts: [IN], op: fn(ps, IN)) {
 }
 
 
-fn commasep_cmnt<IN>(s: ps, b: breaks, elts: [IN], op: fn(ps, IN),
-                     get_span: fn(IN) -> codemap::span) {
+fn commasep_cmnt<IN>(s: ps, b: breaks, elts: [IN], op: block(ps, IN),
+                     get_span: block(IN) -> codemap::span) {
     box(s, 0u, b);
     let len = vec::len::<IN>(elts);
     let i = 0u;
@@ -1246,7 +1246,7 @@ fn print_view_item(s: ps, item: @ast::view_item) {
         for elt: ast::ident in *mod_path { word(s.s, elt); word(s.s, "::"); }
         word(s.s, "{");
         commasep(s, inconsistent, idents,
-                 fn (s: ps, w: ast::import_ident) { word(s.s, w.node.name) });
+                 fn@(s: ps, w: ast::import_ident) { word(s.s, w.node.name) });
         word(s.s, "}");
       }
       ast::view_item_import_glob(ids, _) {
@@ -1261,7 +1261,7 @@ fn print_view_item(s: ps, item: @ast::view_item) {
       ast::view_item_export(ids, _) {
         head(s, "export");
         commasep(s, inconsistent, ids,
-                 fn (s: ps, &&w: ast::ident) { word(s.s, w) });
+                 fn@(s: ps, &&w: ast::ident) { word(s.s, w) });
       }
     }
     word(s.s, ";");
@@ -1604,7 +1604,7 @@ fn ast_fn_constrs_str(decl: ast::fn_decl, constrs: [@ast::constr]) -> str {
 
 fn proto_to_str(p: ast::proto) -> str {
     ret alt p {
-          ast::proto_bare. { "fn" }
+          ast::proto_bare. { "native fn" }
           ast::proto_block. { "block" }
           ast::proto_uniq. { "fn~" }
           ast::proto_box. { "fn@" }