]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error: expected identifier, found keyword `Self` |
dc9dc135 | 2 | --> $DIR/self_type_keyword.rs:2:10 |
b7449926 XL |
3 | | |
4 | LL | struct Self; | |
5 | | ^^^^ expected identifier, found keyword | |
6 | ||
7 | error: expected identifier, found keyword `Self` | |
dc9dc135 | 8 | --> $DIR/self_type_keyword.rs:14:13 |
b7449926 XL |
9 | | |
10 | LL | ref Self => (), | |
11 | | ^^^^ expected identifier, found keyword | |
12 | ||
e1599b0c XL |
13 | error: `mut` must be followed by a named binding |
14 | --> $DIR/self_type_keyword.rs:16:9 | |
b7449926 XL |
15 | | |
16 | LL | mut Self => (), | |
e1599b0c XL |
17 | | ^^^^^^^^ help: remove the `mut` prefix: `Self` |
18 | | | |
19 | = note: `mut` may be followed by `variable` and `variable @ pattern` | |
b7449926 XL |
20 | |
21 | error: expected identifier, found keyword `Self` | |
e1599b0c | 22 | --> $DIR/self_type_keyword.rs:19:17 |
b7449926 XL |
23 | | |
24 | LL | ref mut Self => (), | |
25 | | ^^^^ expected identifier, found keyword | |
26 | ||
27 | error: expected identifier, found keyword `Self` | |
e1599b0c | 28 | --> $DIR/self_type_keyword.rs:23:15 |
b7449926 XL |
29 | | |
30 | LL | Foo { Self } => (), | |
31 | | ^^^^ expected identifier, found keyword | |
32 | ||
33 | error: expected identifier, found keyword `Self` | |
e1599b0c | 34 | --> $DIR/self_type_keyword.rs:29:26 |
b7449926 XL |
35 | | |
36 | LL | extern crate core as Self; | |
37 | | ^^^^ expected identifier, found keyword | |
38 | ||
39 | error: expected identifier, found keyword `Self` | |
e1599b0c | 40 | --> $DIR/self_type_keyword.rs:34:32 |
b7449926 XL |
41 | | |
42 | LL | use std::option::Option as Self; | |
43 | | ^^^^ expected identifier, found keyword | |
44 | ||
45 | error: expected identifier, found keyword `Self` | |
e1599b0c | 46 | --> $DIR/self_type_keyword.rs:39:11 |
b7449926 XL |
47 | | |
48 | LL | trait Self {} | |
49 | | ^^^^ expected identifier, found keyword | |
50 | ||
51 | error: lifetimes cannot use keyword names | |
dc9dc135 | 52 | --> $DIR/self_type_keyword.rs:6:12 |
b7449926 XL |
53 | | |
54 | LL | struct Bar<'Self>; | |
55 | | ^^^^^ | |
56 | ||
e1599b0c XL |
57 | error: cannot find macro `Self` in this scope |
58 | --> $DIR/self_type_keyword.rs:21:9 | |
b7449926 XL |
59 | | |
60 | LL | Self!() => (), | |
61 | | ^^^^ | |
62 | ||
e74abb32 | 63 | error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope |
e1599b0c XL |
64 | --> $DIR/self_type_keyword.rs:16:13 |
65 | | | |
66 | LL | mut Self => (), | |
67 | | ^^^^ not found in this scope | |
e74abb32 | 68 | | |
c295e0f8 XL |
69 | note: unit struct `foo::Self` exists but is inaccessible |
70 | --> $DIR/self_type_keyword.rs:2:3 | |
e1599b0c | 71 | | |
c295e0f8 XL |
72 | LL | struct Self; |
73 | | ^^^^^^^^^^^^ not accessible | |
e1599b0c | 74 | |
0731742a | 75 | error[E0392]: parameter `'Self` is never used |
dc9dc135 | 76 | --> $DIR/self_type_keyword.rs:6:12 |
0731742a XL |
77 | | |
78 | LL | struct Bar<'Self>; | |
48663c56 | 79 | | ^^^^^ unused parameter |
0731742a | 80 | | |
1b1a35ee | 81 | = help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData` |
0731742a | 82 | |
e1599b0c | 83 | error: aborting due to 12 previous errors |
b7449926 | 84 | |
e74abb32 XL |
85 | Some errors have detailed explanations: E0392, E0531. |
86 | For more information about an error, try `rustc --explain E0392`. |