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`
}
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`
}
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();
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() {}
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
}
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?
}