about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/feature-gates/feature-gate-existential-type.rs17
-rw-r--r--src/test/ui/feature-gates/feature-gate-existential-type.stderr21
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs15
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr21
4 files changed, 36 insertions, 38 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-existential-type.rs b/src/test/ui/feature-gates/feature-gate-existential-type.rs
deleted file mode 100644
index 6dfd2d10870..00000000000
--- a/src/test/ui/feature-gates/feature-gate-existential-type.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Check that existential types must be ungated to use the `existential` keyword
-
-existential type Foo: std::fmt::Debug; //~ ERROR existential types are unstable
-
-trait Bar {
-    type Baa: std::fmt::Debug;
-    fn define() -> Self::Baa;
-}
-
-impl Bar for () {
-    existential type Baa: std::fmt::Debug; //~ ERROR existential types are unstable
-    fn define() -> Self::Baa { 0 }
-}
-
-fn define() -> Foo { 0 }
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-existential-type.stderr b/src/test/ui/feature-gates/feature-gate-existential-type.stderr
deleted file mode 100644
index 30e25e55aff..00000000000
--- a/src/test/ui/feature-gates/feature-gate-existential-type.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: existential types are unstable
-  --> $DIR/feature-gate-existential-type.rs:3:1
-   |
-LL | existential type Foo: std::fmt::Debug;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: for more information, see https://github.com/rust-lang/rust/issues/63063
-   = help: add `#![feature(existential_type)]` to the crate attributes to enable
-
-error[E0658]: existential types are unstable
-  --> $DIR/feature-gate-existential-type.rs:11:5
-   |
-LL |     existential type Baa: std::fmt::Debug;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: for more information, see https://github.com/rust-lang/rust/issues/63063
-   = help: add `#![feature(existential_type)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
new file mode 100644
index 00000000000..e169cbcc34c
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs
@@ -0,0 +1,15 @@
+type Foo = impl std::fmt::Debug; //~ ERROR existential types are unstable
+
+trait Bar {
+    type Baa: std::fmt::Debug;
+    fn define() -> Self::Baa;
+}
+
+impl Bar for () {
+    type Baa = impl std::fmt::Debug; //~ ERROR existential types are unstable
+    fn define() -> Self::Baa { 0 }
+}
+
+fn define() -> Foo { 0 }
+
+fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
new file mode 100644
index 00000000000..83b16af8586
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr
@@ -0,0 +1,21 @@
+error[E0658]: existential types are unstable
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:1:1
+   |
+LL | type Foo = impl std::fmt::Debug;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/63063
+   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+
+error[E0658]: existential types are unstable
+  --> $DIR/feature-gate-type_alias_impl_trait.rs:9:5
+   |
+LL |     type Baa = impl std::fmt::Debug;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: for more information, see https://github.com/rust-lang/rust/issues/63063
+   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.