]> git.lizzy.rs Git - rust.git/blob - src/test/ui/did_you_mean/issue-40006.stderr
Update const_forget.rs
[rust.git] / src / test / ui / did_you_mean / issue-40006.stderr
1 error: expected one of `!` or `::`, found `}`
2   --> $DIR/issue-40006.rs:3:1
3    |
4 LL | impl dyn A {
5    |            - while parsing this item list starting here
6 LL |     Y
7    |      - expected one of `!` or `::`
8 LL | }
9    | ^
10    | |
11    | unexpected token
12    | the item list ends here
13
14 error: expected one of `!` or `::`, found `(`
15   --> $DIR/issue-40006.rs:8:6
16    |
17 LL | trait X {
18    |         - while parsing this item list starting here
19 LL |     X() {}
20    |      ^ expected one of `!` or `::`
21 ...
22 LL | }
23    | - the item list ends here
24
25 error: expected one of `!` or `::`, found `(`
26   --> $DIR/issue-40006.rs:16:6
27    |
28 LL | trait A {
29    |         - while parsing this item list starting here
30 LL |     X() {}
31    |      ^ expected one of `!` or `::`
32 LL | }
33    | - the item list ends here
34
35 error: expected `[`, found `#`
36   --> $DIR/issue-40006.rs:19:17
37    |
38 LL |     fn xxx() { ### }
39    |                 ^ expected `[`
40
41 error: expected one of `!` or `::`, found `=`
42   --> $DIR/issue-40006.rs:22:7
43    |
44 LL | trait C {
45    |         - while parsing this item list starting here
46 LL |     L = M;
47    |       ^ expected one of `!` or `::`
48 LL | }
49    | - the item list ends here
50
51 error: expected one of `!` or `::`, found `=`
52   --> $DIR/issue-40006.rs:25:7
53    |
54 LL | trait D {
55    |         - while parsing this item list starting here
56 LL |     Z = { 2 + 3 };
57    |       ^ expected one of `!` or `::`
58 LL | }
59    | - the item list ends here
60
61 error: expected one of `!` or `::`, found `(`
62   --> $DIR/issue-40006.rs:28:9
63    |
64 LL | trait E {
65    |         - while parsing this item list starting here
66 LL |     ::Y ();
67    |         ^ expected one of `!` or `::`
68 LL | }
69    | - the item list ends here
70
71 error: missing `fn` for method definition
72   --> $DIR/issue-40006.rs:32:8
73    |
74 LL | impl S {
75    |        - while parsing this item list starting here
76 LL |     pub hello_method(&self) {
77    |        ^
78 ...
79 LL | }
80    | - the item list ends here
81    |
82 help: add `fn` here to parse `hello_method` as a public method
83    |
84 LL |     pub fn hello_method(&self) {
85    |         ^^
86
87 error[E0599]: no method named `hello_method` found for struct `S` in the current scope
88   --> $DIR/issue-40006.rs:38:7
89    |
90 LL | struct S;
91    | --------- method `hello_method` not found for this
92 ...
93 LL |     S.hello_method();
94    |       ^^^^^^^^^^^^ method not found in `S`
95
96 error: aborting due to 9 previous errors
97
98 For more information about this error, try `rustc --explain E0599`.