]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/self_type_keyword.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / self / self_type_keyword.stderr
CommitLineData
b7449926 1error: expected identifier, found keyword `Self`
dc9dc135 2 --> $DIR/self_type_keyword.rs:2:10
b7449926
XL
3 |
4LL | struct Self;
5 | ^^^^ expected identifier, found keyword
6
7error: expected identifier, found keyword `Self`
dc9dc135 8 --> $DIR/self_type_keyword.rs:14:13
b7449926
XL
9 |
10LL | ref Self => (),
11 | ^^^^ expected identifier, found keyword
12
e1599b0c
XL
13error: `mut` must be followed by a named binding
14 --> $DIR/self_type_keyword.rs:16:9
b7449926
XL
15 |
16LL | 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
21error: expected identifier, found keyword `Self`
e1599b0c 22 --> $DIR/self_type_keyword.rs:19:17
b7449926
XL
23 |
24LL | ref mut Self => (),
25 | ^^^^ expected identifier, found keyword
26
27error: expected identifier, found keyword `Self`
e1599b0c 28 --> $DIR/self_type_keyword.rs:23:15
b7449926
XL
29 |
30LL | Foo { Self } => (),
31 | ^^^^ expected identifier, found keyword
32
33error: expected identifier, found keyword `Self`
e1599b0c 34 --> $DIR/self_type_keyword.rs:29:26
b7449926
XL
35 |
36LL | extern crate core as Self;
37 | ^^^^ expected identifier, found keyword
38
39error: expected identifier, found keyword `Self`
e1599b0c 40 --> $DIR/self_type_keyword.rs:34:32
b7449926
XL
41 |
42LL | use std::option::Option as Self;
43 | ^^^^ expected identifier, found keyword
44
45error: expected identifier, found keyword `Self`
e1599b0c 46 --> $DIR/self_type_keyword.rs:39:11
b7449926
XL
47 |
48LL | trait Self {}
49 | ^^^^ expected identifier, found keyword
50
51error: lifetimes cannot use keyword names
dc9dc135 52 --> $DIR/self_type_keyword.rs:6:12
b7449926
XL
53 |
54LL | struct Bar<'Self>;
55 | ^^^^^
56
e1599b0c
XL
57error: cannot find macro `Self` in this scope
58 --> $DIR/self_type_keyword.rs:21:9
b7449926
XL
59 |
60LL | Self!() => (),
61 | ^^^^
62
e74abb32 63error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope
e1599b0c
XL
64 --> $DIR/self_type_keyword.rs:16:13
65 |
66LL | mut Self => (),
67 | ^^^^ not found in this scope
e74abb32 68 |
c295e0f8
XL
69note: unit struct `foo::Self` exists but is inaccessible
70 --> $DIR/self_type_keyword.rs:2:3
e1599b0c 71 |
c295e0f8
XL
72LL | struct Self;
73 | ^^^^^^^^^^^^ not accessible
e1599b0c 74
0731742a 75error[E0392]: parameter `'Self` is never used
dc9dc135 76 --> $DIR/self_type_keyword.rs:6:12
0731742a
XL
77 |
78LL | 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 83error: aborting due to 12 previous errors
b7449926 84
e74abb32
XL
85Some errors have detailed explanations: E0392, E0531.
86For more information about an error, try `rustc --explain E0392`.