Fix error messages in test cases, since fns/traits now pretty-print with a bounds list

This commit is contained in:
Ben Blum 2013-06-23 02:44:51 -04:00
parent fcf361745f
commit 394f455b5e
6 changed files with 8 additions and 8 deletions

View File

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

View File

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

View File

@ -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();

View File

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

View File

@ -17,5 +17,5 @@ fn main() {
let x: @Map<~str, ~str> = @HashMap::new::<~str, ~str>() as
@Map<~str, ~str>;
let y: @Map<uint, ~str> = @x;
//~^ ERROR mismatched types: expected `@std::container::Map<uint,~str>`
//~^ ERROR expected trait std::container::Map but found @-ptr
}

View File

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