]> git.lizzy.rs Git - rust.git/blob - src/test/compile-fail/class-method-missing.rs
Remove struct ctors
[rust.git] / src / test / compile-fail / class-method-missing.rs
1 // error-pattern:missing method `eat`
2 trait animal {
3   fn eat();
4 }
5
6 struct cat : animal {
7   let meows: uint;
8 }
9
10 fn cat(in_x : uint) -> cat {
11     cat {
12         meows: in_x
13     }
14 }
15
16 fn main() {
17   let nyan = cat(0u);
18 }