From 394f455b5edfe96b51bc713ccc65ad3db6bed92f Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Sun, 23 Jun 2013 02:44:51 -0400 Subject: [PATCH] Fix error messages in test cases, since fns/traits now pretty-print with a bounds list --- src/test/compile-fail/class-cast-to-trait.rs | 2 +- src/test/compile-fail/extern-wrong-value-type.rs | 2 +- src/test/compile-fail/issue-4523.rs | 2 +- src/test/compile-fail/issue-4972.rs | 4 ++-- src/test/compile-fail/map-types.rs | 2 +- src/test/compile-fail/missing-do.rs | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/compile-fail/class-cast-to-trait.rs b/src/test/compile-fail/class-cast-to-trait.rs index 7f7c58a60df..0d1582bf857 100644 --- a/src/test/compile-fail/class-cast-to-trait.rs +++ b/src/test/compile-fail/class-cast-to-trait.rs @@ -58,5 +58,5 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat { fn main() { let nyan : @noisy = @cat(0, 2, ~"nyan") as @noisy; - nyan.eat(); //~ ERROR type `@noisy` does not implement any method in scope named `eat` + nyan.eat(); //~ ERROR does not implement any method in scope named `eat` } diff --git a/src/test/compile-fail/extern-wrong-value-type.rs b/src/test/compile-fail/extern-wrong-value-type.rs index 4daa7f71adf..fbb0f6e46a1 100644 --- a/src/test/compile-fail/extern-wrong-value-type.rs +++ b/src/test/compile-fail/extern-wrong-value-type.rs @@ -13,5 +13,5 @@ extern fn f() { fn main() { // extern functions are *u8 types - let _x: &fn() = f; //~ ERROR mismatched types: expected `&fn()` but found `*u8` + let _x: &fn() = f; //~ ERROR found `*u8` } diff --git a/src/test/compile-fail/issue-4523.rs b/src/test/compile-fail/issue-4523.rs index 6d072ce210e..332db60c836 100644 --- a/src/test/compile-fail/issue-4523.rs +++ b/src/test/compile-fail/issue-4523.rs @@ -10,7 +10,7 @@ fn foopy() {} -static f: &'static fn() = foopy; //~ ERROR mismatched types: expected `&'static fn()` +static f: &'static fn() = foopy; //~ ERROR found extern fn fn main () { f(); diff --git a/src/test/compile-fail/issue-4972.rs b/src/test/compile-fail/issue-4972.rs index bd74199dabd..fcd15a21219 100644 --- a/src/test/compile-fail/issue-4972.rs +++ b/src/test/compile-fail/issue-4972.rs @@ -16,8 +16,8 @@ pub enum TraitWrapper { fn get_tw_map<'lt>(tw: &'lt TraitWrapper) -> &'lt MyTrait { match *tw { - A(~ref map) => map, //~ ERROR mismatched types: expected `~MyTrait` but found a ~-box pattern + A(~ref map) => map, //~ ERROR found a ~-box pattern } } -pub fn main() {} \ No newline at end of file +pub fn main() {} diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs index f5d6e95fe2f..f6fd8e29a4f 100644 --- a/src/test/compile-fail/map-types.rs +++ b/src/test/compile-fail/map-types.rs @@ -17,5 +17,5 @@ fn main() { let x: @Map<~str, ~str> = @HashMap::new::<~str, ~str>() as @Map<~str, ~str>; let y: @Map = @x; - //~^ ERROR mismatched types: expected `@std::container::Map` + //~^ ERROR expected trait std::container::Map but found @-ptr } diff --git a/src/test/compile-fail/missing-do.rs b/src/test/compile-fail/missing-do.rs index b5789d73771..e6a7698d0f0 100644 --- a/src/test/compile-fail/missing-do.rs +++ b/src/test/compile-fail/missing-do.rs @@ -13,7 +13,7 @@ fn foo(f: &fn()) { f() } fn main() { - ~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str` - foo || {}; //~ ERROR binary operation || cannot be applied to type `extern "Rust" fn(&fn())` + ~"" || 42; //~ ERROR binary operation || cannot be applied to type + foo || {}; //~ ERROR binary operation || cannot be applied to type //~^ NOTE did you forget the `do` keyword for the call? }