rust/src/test/compile-fail/class-method-missing.rs

13 lines
189 B
Rust
Raw Normal View History

// error-pattern:missing method `eat`
trait animal {
fn eat();
}
2012-08-15 18:46:55 -07:00
struct cat : animal {
let meows: uint;
new(in_x : uint) { self.meows = in_x; }
}
fn main() {
let nyan = cat(0u);
}