unxfail-test and try to test for similar conditions as before

fixes #2772
This commit is contained in:
Niko Matsakis 2012-08-09 10:50:18 -07:00
parent 7bbdf296e0
commit 9a77a17e3b
2 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,2 @@
// xfail-test After the closure syntax change this started failing with the wrong error message
// error-pattern: not all control paths return
fn force(f: fn() -> int) -> int { f() }
fn main() { log(error, force(|| {})); }
fn main() { log(debug, force(|| {})); } //~ ERROR mismatched types

View File

@ -1,6 +1,5 @@
// xfail-test After the closure syntax change this started failing with the wrong error message
fn main(_s: ~[str]) {
fn main() {
let a: ~[int] = ~[];
do vec::each(a) |_x| { //~ ERROR not all control paths return a value
}
vec::each(a, fn@(_x: int) -> bool { //~ ERROR not all control paths return a value
});
}