]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/unboxed-closures-wrong-trait.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / test / compile-fail / unboxed-closures-wrong-trait.rs
index 50d90c6200e12efef860ef946ca59e580eb072f3..97ad64a77baf44cb18c2d556fe648a2febdbf3c5 100644 (file)
 
 #![feature(lang_items, overloaded_calls, unboxed_closures)]
 
-fn c<F:|: int, int| -> int>(f: F) -> int {
+fn c<F:FnOnce(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);
-    //~^ ERROR failed to find an implementation
+    //~^ ERROR not implemented
 }