From cf753a2dc7c060bcbf6d9241032cf57e597393eb Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 3 Nov 2014 14:48:17 -0500 Subject: [PATCH] Correct tests that were supposed to fail but now pass due to the fn trait hierarchy. --- .../compile-fail/unboxed-closures-static-call-wrong-trait.rs | 2 +- src/test/compile-fail/unboxed-closures-vtable-mismatch.rs | 2 +- src/test/compile-fail/unboxed-closures-wrong-trait.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs index 871889f26dfd..4fa72b383067 100644 --- a/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs +++ b/src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs @@ -12,6 +12,6 @@ fn main() { let mut_ = |&mut: x| x; - mut_.call_once((0i, )); //~ ERROR type `closure` does not implement + mut_.call((0i, )); //~ ERROR type `closure` does not implement } diff --git a/src/test/compile-fail/unboxed-closures-vtable-mismatch.rs b/src/test/compile-fail/unboxed-closures-vtable-mismatch.rs index a96bde7cca4c..5a22490b6d61 100644 --- a/src/test/compile-fail/unboxed-closures-vtable-mismatch.rs +++ b/src/test/compile-fail/unboxed-closures-vtable-mismatch.rs @@ -18,7 +18,7 @@ fn call_it>(y: int, mut f: F) -> int { pub fn main() { let f = |&mut: x: uint, y: int| -> int { (x as int) + y }; - let z = call_it(3, f); //~ ERROR type mismatch + let z = call_it(3, f); //~ ERROR not implemented println!("{}", z); } diff --git a/src/test/compile-fail/unboxed-closures-wrong-trait.rs b/src/test/compile-fail/unboxed-closures-wrong-trait.rs index 97ad64a77baf..e15fe8ad049b 100644 --- a/src/test/compile-fail/unboxed-closures-wrong-trait.rs +++ b/src/test/compile-fail/unboxed-closures-wrong-trait.rs @@ -10,13 +10,13 @@ #![feature(lang_items, overloaded_calls, unboxed_closures)] -fn c int>(f: F) -> int { +fn c int>(f: F) -> int { f(5, 6) } fn main() { let z: int = 7; - assert_eq!(c(|&: x: int, y| x + y + z), 10); + assert_eq!(c(|&mut: x: int, y| x + y + z), 10); //~^ ERROR not implemented }