about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-11-03 14:48:17 -0500
committerNiko Matsakis <niko@alum.mit.edu>2014-11-05 22:01:30 -0500
commitcf753a2dc7c060bcbf6d9241032cf57e597393eb (patch)
tree097f212af1f62c477746d7cc7bbc16d7a4574f80
parentff361530b50ab10570085f3d611d834cc4ece4a5 (diff)
downloadrust-cf753a2dc7c060bcbf6d9241032cf57e597393eb.tar.gz
rust-cf753a2dc7c060bcbf6d9241032cf57e597393eb.zip
Correct tests that were supposed to fail but now pass due to the fn trait hierarchy.
-rw-r--r--src/test/compile-fail/unboxed-closures-static-call-wrong-trait.rs2
-rw-r--r--src/test/compile-fail/unboxed-closures-vtable-mismatch.rs2
-rw-r--r--src/test/compile-fail/unboxed-closures-wrong-trait.rs4
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 871889f26df..4fa72b38306 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 a96bde7cca4..5a22490b6d6 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<F:FnMut<(int,int),int>>(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 97ad64a77ba..e15fe8ad049 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<F:FnOnce(int, int) -> int>(f: F) -> int {
+fn c<F:Fn(int, int) -> 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
 }