@@ -10,26 +10,6 @@ error: expected identifier, found keyword `Self`
1010LL | ref Self => (),
1111 | ^^^^ expected identifier, found keyword
1212
13- error: `mut` must be followed by a named binding
14- --> $DIR/self_type_keyword.rs:16:9
15- |
16- LL | mut Self => (),
17- | ^^^^ help: remove the `mut` prefix
18- |
19- = note: `mut` may be followed by `variable` and `variable @ pattern`
20-
21- error: expected identifier, found keyword `Self`
22- --> $DIR/self_type_keyword.rs:19:17
23- |
24- LL | ref mut Self => (),
25- | ^^^^ expected identifier, found keyword
26-
27- error: expected identifier, found keyword `Self`
28- --> $DIR/self_type_keyword.rs:23:15
29- |
30- LL | Foo { Self } => (),
31- | ^^^^ expected identifier, found keyword
32-
3313error: expected identifier, found keyword `Self`
3414 --> $DIR/self_type_keyword.rs:31:26
3515 |
@@ -54,24 +34,6 @@ error: lifetimes cannot use keyword names
5434LL | struct Bar<'Self>;
5535 | ^^^^^
5636
57- error: cannot find macro `Self` in this scope
58- --> $DIR/self_type_keyword.rs:21:9
59- |
60- LL | Self!() => (),
61- | ^^^^
62-
63- error[E0531]: cannot find unit struct, unit variant or constant `Self` in this scope
64- --> $DIR/self_type_keyword.rs:16:13
65- |
66- LL | mut Self => (),
67- | ^^^^ not found in this scope
68- |
69- note: unit struct `foo::Self` exists but is inaccessible
70- --> $DIR/self_type_keyword.rs:2:3
71- |
72- LL | struct Self;
73- | ^^^^^^^^^^^^ not accessible
74-
7537error[E0392]: parameter `'Self` is never used
7638 --> $DIR/self_type_keyword.rs:6:12
7739 |
@@ -80,22 +42,6 @@ LL | struct Bar<'Self>;
8042 |
8143 = help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData`
8244
83- error[E0308]: mismatched types
84- --> $DIR/self_type_keyword.rs:23:9
85- |
86- LL | match 15 {
87- | -- this expression has type `{integer}`
88- ...
89- LL | Foo { Self } => (),
90- | ^^^^^^^^^^^^ expected integer, found `Foo`
91-
92- error[E0026]: struct `Foo` does not have a field named `Self`
93- --> $DIR/self_type_keyword.rs:23:15
94- |
95- LL | Foo { Self } => (),
96- | ^^^^ struct `Foo` does not have this field
97-
98- error: aborting due to 14 previous errors
45+ error: aborting due to 7 previous errors
9946
100- Some errors have detailed explanations: E0026, E0308, E0392, E0531.
101- For more information about an error, try `rustc --explain E0026`.
47+ For more information about this error, try `rustc --explain E0392`.
0 commit comments