fix pretty tests

This commit is contained in:
Jorge Aparicio 2015-01-05 08:22:04 -05:00
parent d6a948e8f4
commit 1bbeb37582
4 changed files with 5 additions and 5 deletions

View file

@ -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) { }

View file

@ -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() { }

View file

@ -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) }) }

View file

@ -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() { }