blob: 5dc18328f31ed3509c7e89f62be94bf8b739a6e4 [file] [log] [blame]
trait Animal {
fn eat(&self);
}
struct Cat {
meows: usize,
}
impl Animal for Cat {
//~^ ERROR not all trait items implemented, missing: `eat`
}
fn cat(in_x : usize) -> Cat {
Cat {
meows: in_x
}
}
fn main() {
let nyan = cat(0);
}