mirror of https://github.com/rust-lang/rust
102 lines
3.0 KiB
Plaintext
102 lines
3.0 KiB
Plaintext
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
|
|
|
|
|
= 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:31:26
|
|
|
|
|
LL | extern crate core as Self;
|
|
| ^^^^ expected identifier, found keyword
|
|
|
|
error: expected identifier, found keyword `Self`
|
|
--> $DIR/self_type_keyword.rs:36:32
|
|
|
|
|
LL | use std::option::Option as Self;
|
|
| ^^^^ expected identifier, found keyword
|
|
|
|
error: expected identifier, found keyword `Self`
|
|
--> $DIR/self_type_keyword.rs:41: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]: lifetime parameter `'Self` is never used
|
|
--> $DIR/self_type_keyword.rs:6:12
|
|
|
|
|
LL | struct Bar<'Self>;
|
|
| ^^^^^ unused lifetime parameter
|
|
|
|
|
= help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/self_type_keyword.rs:23:9
|
|
|
|
|
LL | match 15 {
|
|
| -- this expression has type `{integer}`
|
|
...
|
|
LL | Foo { Self } => (),
|
|
| ^^^^^^^^^^^^ expected integer, found `Foo`
|
|
|
|
error[E0026]: struct `Foo` does not have a field named `Self`
|
|
--> $DIR/self_type_keyword.rs:23:15
|
|
|
|
|
LL | Foo { Self } => (),
|
|
| ^^^^ struct `Foo` does not have this field
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
Some errors have detailed explanations: E0026, E0308, E0392, E0531.
|
|
For more information about an error, try `rustc --explain E0026`.
|