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

18 lines
215 B
Rust
Raw Normal View History

// error-pattern:missing method `eat`
trait animal {
fn eat();
}
2012-08-15 20:46:55 -05:00
struct cat : animal {
let meows: uint;
2012-09-05 17:58:43 -05:00
}
fn cat(in_x : uint) -> cat {
cat {
meows: in_x
}
}
fn main() {
let nyan = cat(0u);
}