about summary refs log tree commit diff
path: root/src/libstd
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/libstd
parentd2be5b6c7a20b8b33f61cd0db4a3cbbdd7a5448a (diff)
deprecate fn exprs and the fn() type, preferring fn@ and native fn
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/io.rs8
-rw-r--r--src/libstd/map.rs4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/io.rs b/src/libstd/io.rs
index 39247ef6380..f55af2bd91f 100644
--- a/src/libstd/io.rs
+++ b/src/libstd/io.rs
@@ -523,7 +523,7 @@ mod fsync {
     type arg<t> = {
         val: t,
         opt_level: option::t<level>,
-        fsync_fn: fn(t, level) -> int
+        fsync_fn: fn@(t, level) -> int
     };
 
     // fsync file after executing blk
@@ -532,7 +532,7 @@ mod fsync {
                   blk: block(&&res<os::libc::FILE>)) {
         blk(res({
             val: *file, opt_level: opt_level,
-            fsync_fn: fn(&&file: os::libc::FILE, l: level) -> int {
+            fsync_fn: fn@(&&file: os::libc::FILE, l: level) -> int {
                 ret os::fsync_fd(os::libc::fileno(file), l) as int;
             }
         }));
@@ -543,7 +543,7 @@ mod fsync {
                    blk: block(&&res<fd_t>)) {
         blk(res({
             val: *fd, opt_level: opt_level,
-            fsync_fn: fn(&&fd: fd_t, l: level) -> int {
+            fsync_fn: fn@(&&fd: fd_t, l: level) -> int {
                 ret os::fsync_fd(fd, l) as int;
             }
         }));
@@ -556,7 +556,7 @@ mod fsync {
     fn obj_sync(&&o: t, opt_level: option::t<level>, blk: block(&&res<t>)) {
         blk(res({
             val: o, opt_level: opt_level,
-            fsync_fn: fn(&&o: t, l: level) -> int { ret o.fsync(l); }
+            fsync_fn: fn@(&&o: t, l: level) -> int { ret o.fsync(l); }
         }));
     }
 }
diff --git a/src/libstd/map.rs b/src/libstd/map.rs
index 0ea2f35d719..c1385bb87d5 100644
--- a/src/libstd/map.rs
+++ b/src/libstd/map.rs
@@ -13,14 +13,14 @@ A function that returns a hash of a value.
 The hash should concentrate entropy in the
 lower bits.
 */
-type hashfn<K> = fn(K) -> uint;
+type hashfn<K> = fn@(K) -> uint;
 
 /*
 Type: eqfn
 
 Equality
 */
-type eqfn<K> = fn(K, K) -> bool;
+type eqfn<K> = fn@(K, K) -> bool;
 
 /*
 Type: hashset