]> git.proxmox.com Git - rustc.git/blobdiff - src/test/run-pass/closure-inference.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / run-pass / closure-inference.rs
index 167fbdf3fc0524c9801664e5e4dee1ecc59e59c8..06b6e1b5abeddb6bffd7163a08d80054fd1a7b5d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -8,11 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// xfail-fast
 
-fn foo(i: int) -> int { i + 1 }
+// pretty-expanded FIXME #23616
 
-fn apply<A>(f: &fn(A) -> A, v: A) -> A { f(v) }
+fn foo(i: isize) -> isize { i + 1 }
+
+fn apply<A, F>(f: F, v: A) -> A where F: FnOnce(A) -> A { f(v) }
 
 pub fn main() {
     let f = {|i| foo(i)};