rust/src/test/compile-fail/class-method-missing.rs
2012-08-17 10:13:45 -07:00

13 lines
No EOL
189 B
Rust

// error-pattern:missing method `eat`
trait animal {
fn eat();
}
struct cat : animal {
let meows: uint;
new(in_x : uint) { self.meows = in_x; }
}
fn main() {
let nyan = cat(0u);
}