1 error: expected one of `!` or `::`, found `}`
2 --> $DIR/issue-40006.rs:3:1
5 | - while parsing this item list starting here
7 | - expected one of `!` or `::`
12 | the item list ends here
14 error: expected one of `!` or `::`, found `(`
15 --> $DIR/issue-40006.rs:8:6
18 | - while parsing this item list starting here
20 | ^ expected one of `!` or `::`
23 | - the item list ends here
25 error: expected one of `!` or `::`, found `(`
26 --> $DIR/issue-40006.rs:16:6
29 | - while parsing this item list starting here
31 | ^ expected one of `!` or `::`
33 | - the item list ends here
35 error: expected one of `!` or `[`, found `#`
36 --> $DIR/issue-40006.rs:19:17
39 | ^ expected one of `!` or `[`
41 error: expected one of `!` or `::`, found `=`
42 --> $DIR/issue-40006.rs:22:7
45 | - while parsing this item list starting here
47 | ^ expected one of `!` or `::`
49 | - the item list ends here
51 error: expected one of `!` or `::`, found `=`
52 --> $DIR/issue-40006.rs:25:7
55 | - while parsing this item list starting here
57 | ^ expected one of `!` or `::`
59 | - the item list ends here
61 error: expected one of `!` or `::`, found `(`
62 --> $DIR/issue-40006.rs:28:9
65 | - while parsing this item list starting here
67 | ^ expected one of `!` or `::`
69 | - the item list ends here
71 error: missing `fn` for method definition
72 --> $DIR/issue-40006.rs:32:8
75 | - while parsing this item list starting here
76 LL | pub hello_method(&self) {
80 | - the item list ends here
82 help: add `fn` here to parse `hello_method` as a public method
84 LL | pub fn hello_method(&self) {
87 error[E0599]: no method named `hello_method` found for struct `S` in the current scope
88 --> $DIR/issue-40006.rs:38:7
91 | - method `hello_method` not found for this struct
93 LL | S.hello_method();
94 | ^^^^^^^^^^^^ method not found in `S`
96 error: aborting due to 9 previous errors
98 For more information about this error, try `rustc --explain E0599`.