about summary refs log tree commit diff
path: root/src/libcore/sys.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/sys.rs')
-rw-r--r--src/libcore/sys.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/sys.rs b/src/libcore/sys.rs
index d4db61f4519..179a33ae43e 100644
--- a/src/libcore/sys.rs
+++ b/src/libcore/sys.rs
@@ -227,7 +227,7 @@ pub mod tests {
     pub fn synthesize_closure() {
         unsafe {
             let x = 10;
-            let f: fn(int) -> int = |y| x + y;
+            let f: &fn(int) -> int = |y| x + y;
 
             fail_unless!(f(20) == 30);
 
@@ -241,7 +241,7 @@ pub mod tests {
                 env: environment
             };
 
-            let new_f: fn(int) -> int = cast::transmute(new_closure);
+            let new_f: &fn(int) -> int = cast::transmute(new_closure);
             fail_unless!(new_f(20) == 30);
         }
     }