about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Regueiro <alexreg@me.com>2019-07-06 16:16:12 +0100
committerAlexander Regueiro <alexreg@me.com>2019-07-06 16:16:12 +0100
commitf035630089a4d7b037183cd9ded8b275e37601d6 (patch)
treeb921e1fa3cef73ac6204b833b3d8c9b50e560694
parent11228ca3a08295fe452891a3d468b89bb874bc47 (diff)
downloadrust-f035630089a4d7b037183cd9ded8b275e37601d6.tar.gz
rust-f035630089a4d7b037183cd9ded8b275e37601d6.zip
Blessed tests.
-rw-r--r--src/test/ui/type-alias/issue-62263-self-in-atb.stderr9
-rw-r--r--src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr9
-rw-r--r--src/test/ui/type-alias/issue-62364-self-ty-arg.stderr9
3 files changed, 27 insertions, 0 deletions
diff --git a/src/test/ui/type-alias/issue-62263-self-in-atb.stderr b/src/test/ui/type-alias/issue-62263-self-in-atb.stderr
new file mode 100644
index 00000000000..a642d029f93
--- /dev/null
+++ b/src/test/ui/type-alias/issue-62263-self-in-atb.stderr
@@ -0,0 +1,9 @@
+error[E0433]: failed to resolve: use of undeclared type or module `Self`
+  --> $DIR/issue-62263-self-in-atb.rs:5:32
+   |
+LL | pub type Alias = dyn Trait<A = Self::A>;
+   |                                ^^^^ use of undeclared type or module `Self`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr b/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr
new file mode 100644
index 00000000000..6eb445e9dbc
--- /dev/null
+++ b/src/test/ui/type-alias/issue-62305-self-assoc-ty.stderr
@@ -0,0 +1,9 @@
+error[E0433]: failed to resolve: use of undeclared type or module `Self`
+  --> $DIR/issue-62305-self-assoc-ty.rs:1:14
+   |
+LL | type Alias = Self::Target;
+   |              ^^^^ use of undeclared type or module `Self`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0433`.
diff --git a/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr b/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr
new file mode 100644
index 00000000000..5ed27760a82
--- /dev/null
+++ b/src/test/ui/type-alias/issue-62364-self-ty-arg.stderr
@@ -0,0 +1,9 @@
+error[E0411]: cannot find type `Self` in this scope
+  --> $DIR/issue-62364-self-ty-arg.rs:5:29
+   |
+LL | type Alias<'a> = Struct<&'a Self>;
+   |                             ^^^^ `Self` is only available in impls, traits, and type definitions
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0411`.