summaryrefslogtreecommitdiffstats
path: root/src/test/ui/self/self_type_keyword.stderr
blob: aca08d81163fd7428a4b590705222f26b27fd500 (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
error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:2:10
   |
LL |   struct Self;
   |          ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:14:13
   |
LL |         ref Self => (),
   |             ^^^^ expected identifier, found keyword

error: `mut` must be followed by a named binding
  --> $DIR/self_type_keyword.rs:16:9
   |
LL |         mut Self => (),
   |         ^^^^^^^^ help: remove the `mut` prefix: `Self`
   |
   = note: `mut` may be followed by `variable` and `variable @ pattern`

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:19:17
   |
LL |         ref mut Self => (),
   |                 ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:23:15
   |
LL |         Foo { Self } => (),
   |               ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:29:26
   |
LL |     extern crate core as Self;
   |                          ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:34:32
   |
LL |     use std::option::Option as Self;
   |                                ^^^^ expected identifier, found keyword

error: expected identifier, found keyword `Self`
  --> $DIR/self_type_keyword.rs:39:11
   |
LL |     trait Self {}
   |           ^^^^ expected identifier, found keyword

error: lifetimes cannot use keyword names
  --> $DIR/self_type_keyword.rs:6:12
   |
LL | struct Bar<'Self>;
   |            ^^^^^

error: cannot find macro `Self` in this scope
  --> $DIR/self_type_keyword.rs:21:9
   |
LL |         Self!() => (),
   |         ^^^^

error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope
  --> $DIR/self_type_keyword.rs:16:13
   |
LL |         mut Self => (),
   |             ^^^^ not found in this scope
   |
note: unit struct `foo::Self` exists but is inaccessible
  --> $DIR/self_type_keyword.rs:2:3
   |
LL |   struct Self;
   |   ^^^^^^^^^^^^ not accessible

error[E0392]: parameter `'Self` is never used
  --> $DIR/self_type_keyword.rs:6:12
   |
LL | struct Bar<'Self>;
   |            ^^^^^ unused parameter
   |
   = help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData`

error: aborting due to 12 previous errors

Some errors have detailed explanations: E0392, E0531.
For more information about an error, try `rustc --explain E0392`.