Fix error messages in test cases, since fns/traits now pretty-print with a bounds list
This commit is contained in:
parent
fcf361745f
commit
394f455b5e
6 changed files with 8 additions and 8 deletions
|
@ -58,5 +58,5 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let nyan : @noisy = @cat(0, 2, ~"nyan") as @noisy;
|
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`
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,5 +13,5 @@ extern fn f() {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// extern functions are *u8 types
|
// extern functions are *u8 types
|
||||||
let _x: &fn() = f; //~ ERROR mismatched types: expected `&fn()` but found `*u8`
|
let _x: &fn() = f; //~ ERROR found `*u8`
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
fn foopy() {}
|
fn foopy() {}
|
||||||
|
|
||||||
static f: &'static fn() = foopy; //~ ERROR mismatched types: expected `&'static fn()`
|
static f: &'static fn() = foopy; //~ ERROR found extern fn
|
||||||
|
|
||||||
fn main () {
|
fn main () {
|
||||||
f();
|
f();
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub enum TraitWrapper {
|
||||||
|
|
||||||
fn get_tw_map<'lt>(tw: &'lt TraitWrapper) -> &'lt MyTrait {
|
fn get_tw_map<'lt>(tw: &'lt TraitWrapper) -> &'lt MyTrait {
|
||||||
match *tw {
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,5 +17,5 @@ fn main() {
|
||||||
let x: @Map<~str, ~str> = @HashMap::new::<~str, ~str>() as
|
let x: @Map<~str, ~str> = @HashMap::new::<~str, ~str>() as
|
||||||
@Map<~str, ~str>;
|
@Map<~str, ~str>;
|
||||||
let y: @Map<uint, ~str> = @x;
|
let y: @Map<uint, ~str> = @x;
|
||||||
//~^ ERROR mismatched types: expected `@std::container::Map<uint,~str>`
|
//~^ ERROR expected trait std::container::Map but found @-ptr
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
fn foo(f: &fn()) { f() }
|
fn foo(f: &fn()) { f() }
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
|
~"" || 42; //~ ERROR binary operation || cannot be applied to type
|
||||||
foo || {}; //~ ERROR binary operation || cannot be applied to type `extern "Rust" fn(&fn())`
|
foo || {}; //~ ERROR binary operation || cannot be applied to type
|
||||||
//~^ NOTE did you forget the `do` keyword for the call?
|
//~^ NOTE did you forget the `do` keyword for the call?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue