1 error: functions are not allowed in struct definitions
2 --> $DIR/struct-fn-in-definition.rs:9:5
5 | - while parsing this struct
10 = help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
11 = help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information
13 error: functions are not allowed in union definitions
14 --> $DIR/struct-fn-in-definition.rs:18:5
17 | - while parsing this union
22 = help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
23 = help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information
25 error: functions are not allowed in enum definitions
26 --> $DIR/struct-fn-in-definition.rs:27:5
29 | - while parsing this enum
34 = help: unlike in C++, Java, and C#, functions are declared in `impl` blocks
35 = help: see https://doc.rust-lang.org/book/ch05-03-method-syntax.html for more information
36 = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
38 error: aborting due to 3 previous errors