From a55011e788e3523cc37c1fca47fc334a74682369 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 5 Jan 2015 16:02:07 -0500 Subject: [PATCH] fix tests --- src/test/compile-fail/unboxed-closures-type-mismatch.rs | 2 +- src/test/run-pass/overloaded-calls-object-zero-args.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/compile-fail/unboxed-closures-type-mismatch.rs b/src/test/compile-fail/unboxed-closures-type-mismatch.rs index a25d6464867..61f13172832 100644 --- a/src/test/compile-fail/unboxed-closures-type-mismatch.rs +++ b/src/test/compile-fail/unboxed-closures-type-mismatch.rs @@ -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); } diff --git a/src/test/run-pass/overloaded-calls-object-zero-args.rs b/src/test/run-pass/overloaded-calls-object-zero-args.rs index 442df1e664c..b38f8213b4a 100644 --- a/src/test/run-pass/overloaded-calls-object-zero-args.rs +++ b/src/test/run-pass/overloaded-calls-object-zero-args.rs @@ -11,11 +11,11 @@ // 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); } -- 2.44.0