mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
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
@ -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`
|
||||
}
|
||||
|
@ -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`
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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() {}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user