summaryrefslogtreecommitdiffstats
path: root/src/test/ui/self/self_type_keyword.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/self/self_type_keyword.stderr')
-rw-r--r--src/test/ui/self/self_type_keyword.stderr86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/test/ui/self/self_type_keyword.stderr b/src/test/ui/self/self_type_keyword.stderr
new file mode 100644
index 000000000..aca08d811
--- /dev/null
+++ b/src/test/ui/self/self_type_keyword.stderr
@@ -0,0 +1,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`.