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