fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.9 KiB70 linesraw
1error: missing `fn`, `type`, or `const` for impl-item declaration
2  --> $DIR/issue-40006.rs:1:13
3   |
4LL |   impl dyn X {
5   |  _____________^
6LL | |
7LL | |     Y
8   | |____^ missing `fn`, `type`, or `const`
9
10error: missing `fn`, `type`, or `const` for trait-item declaration
11  --> $DIR/issue-40006.rs:8:10
12   |
13LL |   trait X {
14   |  __________^
15LL | |     X() {}
16   | |____^ missing `fn`, `type`, or `const`
17
18error: expected `[`, found `#`
19  --> $DIR/issue-40006.rs:10:17
20   |
21LL |     fn xxx() { ### }
22   |                 ^ expected `[`
23
24error: missing `fn`, `type`, or `const` for trait-item declaration
25  --> $DIR/issue-40006.rs:10:21
26   |
27LL |       fn xxx() { ### }
28   |  _____________________^
29LL | |
30LL | |     L = M;
31   | |____^ missing `fn`, `type`, or `const`
32
33error: missing `fn`, `type`, or `const` for trait-item declaration
34  --> $DIR/issue-40006.rs:12:11
35   |
36LL |       L = M;
37   |  ___________^
38LL | |     Z = { 2 + 3 };
39   | |____^ missing `fn`, `type`, or `const`
40
41error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;`
42  --> $DIR/issue-40006.rs:13:18
43   |
44LL |     Z = { 2 + 3 };
45   |                  ^ expected one of 7 possible tokens here
46
47error: expected one of `!` or `::`, found `(`
48  --> $DIR/issue-40006.rs:14:9
49   |
50LL |     ::Y ();
51   |         ^ expected one of `!` or `::` here
52
53error: missing `fn`, `type`, or `const` for impl-item declaration
54  --> $DIR/issue-40006.rs:18:8
55   |
56LL |     pub hello_method(&self) {
57   |        ^ missing `fn`, `type`, or `const`
58
59error[E0038]: the trait `X` cannot be made into an object
60  --> $DIR/issue-40006.rs:1:6
61   |
62LL | impl dyn X {
63   |      ^^^^^ the trait `X` cannot be made into an object
64...
65LL |     fn xxx() { ### }
66   |        --- associated function `xxx` has no `self` parameter
67
68error: aborting due to 9 previous errors
69
70For more information about this error, try `rustc --explain E0038`.