]> git.lizzy.rs Git - rust.git/commitdiff
fix tests
authorJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 21:02:07 +0000 (16:02 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Mon, 5 Jan 2015 22:22:18 +0000 (17:22 -0500)
src/test/compile-fail/unboxed-closures-type-mismatch.rs
src/test/run-pass/overloaded-calls-object-zero-args.rs

index a25d646486712fb30dccbb4121dc0540b2a598b4..61f1317283272b8737c17bc76b572bc771d2e48a 100644 (file)
@@ -14,6 +14,6 @@
 
 pub fn main() {
     let mut f = |&mut: x: int, y: int| -> int { x + y };
-    let z = f(1u, 2);    //~ ERROR type mismatch
+    let z = f(1u, 2);    //~ ERROR mismatched types
     println!("{}", z);
 }
index 442df1e664cc3ca4bffc344c9473f792669e2041..b38f8213b4ab83480908be73aa047f05466734a5 100644 (file)
 // Tests calls to closure arguments where the closure takes 0 arguments.
 // This is a bit tricky due to rust-call ABI.
 
-fn foo(f: &mut FnMut()) -> int {
+fn foo(f: &mut FnMut() -> int) -> int {
     f()
 }
 
 fn main() {
-    let z = foo(|| 22);
+    let z = foo(&mut || 22);
     assert_eq!(z, 22);
 }