// option. This file may not be copied, modified, or distributed
// except according to those terms.
-// error-pattern:missing method `eat`
trait animal {
- fn eat();
+ fn eat(&self);
}
struct cat {
meows: uint,
}
-impl cat : animal {
+impl animal for cat {
+ //~^ ERROR not all trait items implemented, missing: `eat`
}
fn cat(in_x : uint) -> cat {
fn main() {
let nyan = cat(0u);
-}
\ No newline at end of file
+}