]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/unboxed-closures-wrong-arg-type-extern-fn.rs
Update compile fail tests to use isize.
[rust.git] / src / test / compile-fail / unboxed-closures-wrong-arg-type-extern-fn.rs
index f08cff3cd682137ac517bda985cff47e5081edf8..b2fdf792630194e18c54940d5f4901a2e2ba96d6 100644 (file)
 
 use std::ops::{Fn,FnMut,FnOnce};
 
-unsafe fn square(x: int) -> int { x * x }
-// note: argument type here is `int`, not `&int`
+unsafe fn square(x: isize) -> isize { x * x }
+// note: argument type here is `isize`, not `&isize`
 
-fn call_it<F:Fn(&int)->int>(_: &F, _: int) -> int { 0 }
-fn call_it_mut<F:FnMut(&int)->int>(_: &mut F, _: int) -> int { 0 }
-fn call_it_once<F:FnOnce(&int)->int>(_: F, _: int) -> int { 0 }
+fn call_it<F:Fn(&isize)->isize>(_: &F, _: isize) -> isize { 0 }
+fn call_it_mut<F:FnMut(&isize)->isize>(_: &mut F, _: isize) -> isize { 0 }
+fn call_it_once<F:FnOnce(&isize)->isize>(_: F, _: isize) -> isize { 0 }
 
 fn a() {
     let x = call_it(&square, 22); //~ ERROR not implemented