]> git.lizzy.rs Git - rust.git/blob - src/test/compile-fail/class-method-missing.rs
Report obsolete trait lists on structs
[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 {
7   meows: uint,
8 }
9
10 impl cat : animal {
11 }
12
13 fn cat(in_x : uint) -> cat {
14     cat {
15         meows: in_x
16     }
17 }
18
19 fn main() {
20   let nyan = cat(0u);
21 }