Skip to content

Commit 1bbeb37

Browse files
author
Jorge Aparicio
committed
fix pretty tests
1 parent d6a948e commit 1bbeb37

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/test/pretty/closure-reform-pretty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
fn call_it(f: Box<FnMut(String) -> String>) { }
1717

18-
fn call_this(f: |&str|: Send) { }
18+
fn call_this<F>(f: F) where F: Fn(&str) + Send { }
1919

20-
fn call_that(f: <'a>|&'a int, &'a int| -> int) { }
20+
fn call_that<F>(f: F) where F: for<'a>Fn(&'a int, &'a int) -> int { }
2121

2222
fn call_extern(f: fn() -> int) { }
2323

src/test/pretty/disamb-stmt-expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// preserved. They are needed to disambiguate `{return n+1}; - 0` from
1515
// `({return n+1}-0)`.
1616

17-
fn id(f: || -> int) -> int { f() }
17+
fn id<F>(f: F) -> int where F: Fn() -> int { f() }
1818

1919
fn wsucc(_n: int) -> int { id(|| { 1 }) - 0 }
2020
fn main() { }

src/test/pretty/do1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010

1111
// pp-exact
1212

13-
fn f(f: |int|) { f(10) }
13+
fn f<F>(f: F) where F: Fn(int) { f(10) }
1414

1515
fn main() { f(|i| { assert!(i == 10) }) }

src/test/pretty/fn-types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
// pp-exact
1212

1313
fn from_foreign_fn(_x: fn()) { }
14-
fn from_stack_closure(_x: ||) { }
14+
fn from_stack_closure<F>(_x: F) where F: Fn() { }
1515
fn main() { }

0 commit comments

Comments
 (0)