]> git.lizzy.rs Git - rust.git/blobdiff - src/test/compile-fail/regions-ret-borrowed-1.rs
fix cfail tests
[rust.git] / src / test / compile-fail / regions-ret-borrowed-1.rs
index 997775efa84b52d60756dfc3ed3c62652f37dbbb..bd14d31217e88269ee580d55bdb45ed2fa255b03 100644 (file)
@@ -12,7 +12,7 @@
 // some point regions-ret-borrowed reported an error but this file did
 // not, due to special hardcoding around the anonymous region.
 
-fn with<R>(f: for<'a>|x: &'a int| -> R) -> R {
+fn with<R, F>(f: F) -> R where F: for<'a> FnOnce(&'a int) -> R {
     f(&3)
 }