]> git.lizzy.rs Git - rust.git/blob - tests/ui/class-method-missing.rs
Rollup merge of #107700 - jyn514:tools-builder, r=Mark-Simulacrum
[rust.git] / tests / ui / class-method-missing.rs
1 trait Animal {
2   fn eat(&self);
3 }
4
5 struct Cat {
6   meows: usize,
7 }
8
9 impl Animal for Cat {
10     //~^ ERROR not all trait items implemented, missing: `eat`
11 }
12
13 fn cat(in_x : usize) -> Cat {
14     Cat {
15         meows: in_x
16     }
17 }
18
19 fn main() {
20   let nyan = cat(0);
21 }