about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2015-01-05 08:22:04 -0500
committerJorge Aparicio <japaricious@gmail.com>2015-01-05 17:22:17 -0500
commit1bbeb375821fe197342f1e22ab53b796bb0f0c70 (patch)
tree5107f22cc98d91d2aae451636c2243bdca2008a2
parentd6a948e8f40b1d32d4760e0dfdc0c86df654cae6 (diff)
fix pretty tests
-rw-r--r--src/test/pretty/closure-reform-pretty.rs4
-rw-r--r--src/test/pretty/disamb-stmt-expr.rs2
-rw-r--r--src/test/pretty/do1.rs2
-rw-r--r--src/test/pretty/fn-types.rs2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/test/pretty/closure-reform-pretty.rs b/src/test/pretty/closure-reform-pretty.rs
index 328d4245eb6..094e3ce9156 100644
--- a/src/test/pretty/closure-reform-pretty.rs
+++ b/src/test/pretty/closure-reform-pretty.rs
@@ -15,9 +15,9 @@
 
 fn call_it(f: Box<FnMut(String) -> String>) { }
 
-fn call_this(f: |&str|: Send) { }
+fn call_this<F>(f: F) where F: Fn(&str) + Send { }
 
-fn call_that(f: <'a>|&'a int, &'a int| -> int) { }
+fn call_that<F>(f: F) where F: for<'a>Fn(&'a int, &'a int) -> int { }
 
 fn call_extern(f: fn() -> int) { }
 
diff --git a/src/test/pretty/disamb-stmt-expr.rs b/src/test/pretty/disamb-stmt-expr.rs
index 78658a4c121..0c4cd103b82 100644
--- a/src/test/pretty/disamb-stmt-expr.rs
+++ b/src/test/pretty/disamb-stmt-expr.rs
@@ -14,7 +14,7 @@
 // preserved.  They are needed to disambiguate `{return n+1}; - 0` from
 // `({return n+1}-0)`.
 
-fn id(f: || -> int) -> int { f() }
+fn id<F>(f: F) -> int where F: Fn() -> int { f() }
 
 fn wsucc(_n: int) -> int { id(|| { 1 }) - 0 }
 fn main() { }
diff --git a/src/test/pretty/do1.rs b/src/test/pretty/do1.rs
index cd7a5b29a8a..e0066053f3c 100644
--- a/src/test/pretty/do1.rs
+++ b/src/test/pretty/do1.rs
@@ -10,6 +10,6 @@
 
 // pp-exact
 
-fn f(f: |int|) { f(10) }
+fn f<F>(f: F) where F: Fn(int) { f(10) }
 
 fn main() { f(|i| { assert!(i == 10) }) }
diff --git a/src/test/pretty/fn-types.rs b/src/test/pretty/fn-types.rs
index 1313af2df3d..31efb0c9ab1 100644
--- a/src/test/pretty/fn-types.rs
+++ b/src/test/pretty/fn-types.rs
@@ -11,5 +11,5 @@
 // pp-exact
 
 fn from_foreign_fn(_x: fn()) { }
-fn from_stack_closure(_x: ||) { }
+fn from_stack_closure<F>(_x: F) where F: Fn() { }
 fn main() { }