From d58e0e30edf540c7c6212d0ab7c617c272b27f8e Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 15 Nov 2012 14:36:38 -0800 Subject: [PATCH] Update error messages and un-xfail --- src/test/compile-fail/bad-type-env-capture.rs | 5 ++--- src/test/compile-fail/do2.rs | 7 ------- src/test/compile-fail/fn-compare-mismatch.rs | 7 +------ src/test/compile-fail/import-from-missing.rs | 3 +-- src/test/compile-fail/import.rs | 3 +-- src/test/compile-fail/infinite-tag-type-recursion.rs | 3 +-- src/test/compile-fail/issue-1697.rs | 5 ++--- 7 files changed, 8 insertions(+), 25 deletions(-) diff --git a/src/test/compile-fail/bad-type-env-capture.rs b/src/test/compile-fail/bad-type-env-capture.rs index 2a59af3fe80..8974dba487c 100644 --- a/src/test/compile-fail/bad-type-env-capture.rs +++ b/src/test/compile-fail/bad-type-env-capture.rs @@ -1,6 +1,5 @@ -// xfail-test -// error-pattern: attempted dynamic environment-capture fn foo() { - fn bar(b: T) { } + fn bar(b: T) { } //~ ERROR attempt to use a type argument out of scope + //~^ ERROR use of undeclared type name } fn main() { } diff --git a/src/test/compile-fail/do2.rs b/src/test/compile-fail/do2.rs index 62a64e7c3a0..c847f292ccb 100644 --- a/src/test/compile-fail/do2.rs +++ b/src/test/compile-fail/do2.rs @@ -1,13 +1,6 @@ -// xfail-fast -// xfail-test - -// This is xfail'd due to bad typecheck error messages. (There is a spurious -// "expected `bool` but but found `int`" message.) - fn f(f: fn@(int) -> bool) -> bool { f(10i) } fn main() { assert do f() |i| { i == 10i } == 10i; //~^ ERROR: expected `bool` but found `int` - //~^^ ERROR: expected `bool` but found `int` } diff --git a/src/test/compile-fail/fn-compare-mismatch.rs b/src/test/compile-fail/fn-compare-mismatch.rs index 1ca153af3f2..34471dd68c1 100644 --- a/src/test/compile-fail/fn-compare-mismatch.rs +++ b/src/test/compile-fail/fn-compare-mismatch.rs @@ -1,12 +1,7 @@ -// xfail-fast -// xfail-test - -// This is xfail'd due to bad spurious typecheck error messages. - fn main() { fn f() { } fn g() { } let x = f == g; //~^ ERROR mismatched types - //~^^ ERROR cannot determine a type + //~^^ ERROR failed to find an implementation of trait } diff --git a/src/test/compile-fail/import-from-missing.rs b/src/test/compile-fail/import-from-missing.rs index 9b408100eee..2bd70379dd2 100644 --- a/src/test/compile-fail/import-from-missing.rs +++ b/src/test/compile-fail/import-from-missing.rs @@ -1,5 +1,4 @@ -// error-pattern:unresolved -// xfail-test +// error-pattern:failed to resolve import use spam::{ham, eggs}; mod spam { diff --git a/src/test/compile-fail/import.rs b/src/test/compile-fail/import.rs index 6863d2b1a7a..a308597a0d4 100644 --- a/src/test/compile-fail/import.rs +++ b/src/test/compile-fail/import.rs @@ -1,5 +1,4 @@ -// xfail-test -// error-pattern: unresolved +// error-pattern:failed to resolve import use zed::bar; use zed::baz; mod zed { diff --git a/src/test/compile-fail/infinite-tag-type-recursion.rs b/src/test/compile-fail/infinite-tag-type-recursion.rs index 88ecff8be21..b8d34f6f0e8 100644 --- a/src/test/compile-fail/infinite-tag-type-recursion.rs +++ b/src/test/compile-fail/infinite-tag-type-recursion.rs @@ -1,7 +1,6 @@ -// xfail-test // -*- rust -*- -// error-pattern: enum of infinite size +// error-pattern: illegal recursive enum type; wrap the inner value in a box enum mlist { cons(int, mlist), nil, } diff --git a/src/test/compile-fail/issue-1697.rs b/src/test/compile-fail/issue-1697.rs index 0f228519a38..77ba555ab7a 100644 --- a/src/test/compile-fail/issue-1697.rs +++ b/src/test/compile-fail/issue-1697.rs @@ -1,8 +1,7 @@ -// xfail-test // Testing that we don't fail abnormally after hitting the errors -use unresolved::*; //~ ERROR unresolved modulename -//~^ ERROR unresolved does not name a module +use unresolved::*; //~ ERROR unresolved name +//~^ ERROR failed to resolve import fn main() { }