about summary refs log tree commit diff
path: root/src/test/ui/feature-gates
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-07-28 18:28:19 +0900
committerGitHub <noreply@github.com>2021-07-28 18:28:19 +0900
commit23479f716adfbfd424d02a2cf6f4f18f011ffcc2 (patch)
tree6fc26ade76f27316bac76b0b4c51ae571876cd53 /src/test/ui/feature-gates
parent35dddd3deaccb42ad9d47eb72b8a8979d9df7492 (diff)
parentf16ae7ee2673215c0b2f4b363b074f11fdd185f9 (diff)
Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obk
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait

r? ``@oli-obk``
Diffstat (limited to 'src/test/ui/feature-gates')
-rw-r--r--src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs50
-rw-r--r--src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr118
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.rs4
-rw-r--r--src/test/ui/feature-gates/feature-gate-type_alias_impl_trait.stderr14
4 files changed, 4 insertions, 182 deletions
diff --git a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs
deleted file mode 100644
index ffe297a5a6a..00000000000
--- a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-// ignore-compare-mode-chalk
-use std::fmt::Debug;
-
-type Foo = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
-
-trait Bar {
-    type Baa: Debug;
-    fn define() -> Self::Baa;
-}
-
-impl Bar for () {
-    type Baa = impl Debug; //~ ERROR `impl Trait` in type aliases is unstable
-    fn define() -> Self::Baa {
-        0
-    }
-}
-
-fn define() -> Foo {
-    0
-}
-
-trait TraitWithDefault {
-    type Assoc = impl Debug;
-    //~^ ERROR associated type defaults are unstable
-    //~| ERROR `impl Trait` not allowed outside of function
-    //~| ERROR `impl Trait` in type aliases is unstable
-}
-
-type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-//~^ ERROR `impl Trait` in type aliases is unstable
-//~| ERROR `impl Trait` in type aliases is unstable
-//~| ERROR `impl Trait` in type aliases is unstable
-//~| ERROR `impl Trait` in type aliases is unstable
-
-fn define_multiple() -> NestedFree {
-    (vec![true], 0u8, 0i32..1)
-}
-
-impl Bar for u8 {
-    type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-    //~^ ERROR `impl Trait` in type aliases is unstable
-    //~| ERROR `impl Trait` in type aliases is unstable
-    //~| ERROR `impl Trait` in type aliases is unstable
-    //~| ERROR `impl Trait` in type aliases is unstable
-    fn define() -> Self::Baa {
-        (vec![true], 0u8, 0i32..1)
-    }
-}
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr b/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr
deleted file mode 100644
index 07857289aae..00000000000
--- a/src/test/ui/feature-gates/feature-gate-min_type_alias_impl_trait.stderr
+++ /dev/null
@@ -1,118 +0,0 @@
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:4:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:12:16
-   |
-LL |     type Baa = impl Debug;
-   |                ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: associated type defaults are unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:5
-   |
-LL |     type Assoc = impl Debug;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29661 <https://github.com/rust-lang/rust/issues/29661> for more information
-   = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
-   |
-LL |     type Assoc = impl Debug;
-   |                  ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:24
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                        ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:37
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                     ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:49
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:29:70
-   |
-LL | type NestedFree = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug>);
-   |                                                                      ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:21
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                     ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:34
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                  ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:46
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:40:67
-   |
-LL |     type Baa = (Vec<impl Debug>, impl Debug, impl Iterator<Item = impl Debug> + Debug);
-   |                                                                   ^^^^^^^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(min_type_alias_impl_trait)]` to the crate attributes to enable
-
-error[E0562]: `impl Trait` not allowed outside of function and method return types
-  --> $DIR/feature-gate-min_type_alias_impl_trait.rs:23:18
-   |
-LL |     type Assoc = impl Debug;
-   |                  ^^^^^^^^^^
-
-error: aborting due to 13 previous errors
-
-Some errors have detailed explanations: E0562, E0658.
-For more information about an error, try `rustc --explain E0562`.
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
index 4fb1cd2aae1..ea82837d4bf 100644
--- 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
@@ -1,5 +1,5 @@
 // ignore-compare-mode-chalk
-#![feature(min_type_alias_impl_trait)]
+#![feature(type_alias_impl_trait)]
 use std::fmt::Debug;
 
 type Foo = impl Debug;
@@ -13,7 +13,7 @@ fn define() -> Bar {
 type Foo2 = impl Debug;
 
 fn define2() {
-    let x = || -> Foo2 { 42 }; //~ ERROR not permitted here
+    let x = || -> Foo2 { 42 };
 }
 
 type Foo3 = impl Debug;
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
index 10409d5fc4b..da3ddb1c509 100644
--- 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
@@ -10,15 +10,6 @@ LL |     Bar(42)
    = note: expected opaque type `impl Debug`
                      found type `{integer}`
 
-error[E0658]: type alias impl trait is not permitted here
-  --> $DIR/feature-gate-type_alias_impl_trait.rs:16:19
-   |
-LL |     let x = || -> Foo2 { 42 };
-   |                   ^^^^
-   |
-   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
-   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
-
 error[E0308]: mismatched types
   --> $DIR/feature-gate-type_alias_impl_trait.rs:23:18
    |
@@ -77,7 +68,6 @@ error: could not find defining uses
 LL | type Foo4 = impl Debug;
    |             ^^^^^^^^^^
 
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0308, E0658.
-For more information about an error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0308`.