2020-02-22 01:16:39 -06:00
|
|
|
error: expected one of `!` or `::`, found `}`
|
|
|
|
--> $DIR/issue-40006.rs:3:1
|
2017-03-25 01:00:21 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
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
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
error: expected one of `!` or `::`, found `(`
|
|
|
|
--> $DIR/issue-40006.rs:8:6
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | trait X {
|
|
|
|
| - while parsing this item list starting here
|
|
|
|
LL | X() {}
|
|
|
|
| ^ expected one of `!` or `::`
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
error: expected one of `!` or `::`, found `(`
|
|
|
|
--> $DIR/issue-40006.rs:16:6
|
2019-10-25 20:30:02 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | trait A {
|
|
|
|
| - while parsing this item list starting here
|
|
|
|
LL | X() {}
|
|
|
|
| ^ expected one of `!` or `::`
|
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
2019-10-25 20:30:02 -05:00
|
|
|
|
2020-03-05 04:42:56 -06:00
|
|
|
error: expected one of `!` or `[`, found `#`
|
2019-10-25 20:30:02 -05:00
|
|
|
--> $DIR/issue-40006.rs:19:17
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn xxx() { ### }
|
2020-03-05 04:42:56 -06:00
|
|
|
| ^ expected one of `!` or `[`
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
error: expected one of `!` or `::`, found `=`
|
|
|
|
--> $DIR/issue-40006.rs:22:7
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | trait C {
|
|
|
|
| - while parsing this item list starting here
|
|
|
|
LL | L = M;
|
|
|
|
| ^ expected one of `!` or `::`
|
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
error: expected one of `!` or `::`, found `=`
|
|
|
|
--> $DIR/issue-40006.rs:25:7
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | trait D {
|
|
|
|
| - while parsing this item list starting here
|
|
|
|
LL | Z = { 2 + 3 };
|
|
|
|
| ^ expected one of `!` or `::`
|
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
|
|
error: expected one of `!` or `::`, found `(`
|
2019-10-25 20:30:02 -05:00
|
|
|
--> $DIR/issue-40006.rs:28:9
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | trait E {
|
|
|
|
| - while parsing this item list starting here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | ::Y ();
|
2019-10-28 13:08:53 -05:00
|
|
|
| ^ expected one of `!` or `::`
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
error: missing `fn` for method definition
|
2019-10-25 20:30:02 -05:00
|
|
|
--> $DIR/issue-40006.rs:32:8
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2020-02-22 01:16:39 -06:00
|
|
|
LL | impl S {
|
|
|
|
| - while parsing this item list starting here
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub hello_method(&self) {
|
2020-02-22 01:16:39 -06:00
|
|
|
| ^
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - the item list ends here
|
|
|
|
|
|
|
|
|
help: add `fn` here to parse `hello_method` as a public method
|
|
|
|
|
|
|
|
|
LL | pub fn hello_method(&self) {
|
2021-06-21 21:07:19 -05:00
|
|
|
| ++
|
2017-04-13 14:37:05 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `hello_method` found for struct `S` in the current scope
|
2019-10-25 20:30:02 -05:00
|
|
|
--> $DIR/issue-40006.rs:38:7
|
2017-04-13 14:37:05 -05:00
|
|
|
|
|
2019-10-25 20:30:02 -05:00
|
|
|
LL | struct S;
|
2022-07-01 18:47:26 -05:00
|
|
|
| -------- method `hello_method` not found for this struct
|
2019-09-02 22:22:22 -05:00
|
|
|
...
|
2019-10-25 20:30:02 -05:00
|
|
|
LL | S.hello_method();
|
|
|
|
| ^^^^^^^^^^^^ method not found in `S`
|
2017-03-25 01:00:21 -05:00
|
|
|
|
2017-07-02 08:09:09 -05:00
|
|
|
error: aborting due to 9 previous errors
|
2017-03-25 01:00:21 -05:00
|
|
|
|
2019-10-25 20:30:02 -05:00
|
|
|
For more information about this error, try `rustc --explain E0599`.
|