about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2021-07-26 20:38:38 -0300
committerSantiago Pastorino <spastorino@gmail.com>2021-07-27 12:33:14 -0300
commit9629d798ca289934c0c0b622124c642aaf53e018 (patch)
treecb0af9e0a250d741664d59228f24f9d5e80de3df
parent66dbeb5f237aa867a99a41656fad39b646f7651f (diff)
downloadrust-9629d798ca289934c0c0b622124c642aaf53e018.tar.gz
rust-9629d798ca289934c0c0b622124c642aaf53e018.zip
Remove min_type_alias_impl_trait feature
-rw-r--r--compiler/rustc_feature/src/active.rs3
-rw-r--r--compiler/rustc_feature/src/removed.rs4
-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
4 files changed, 4 insertions, 171 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs
index 27c08586f4f..ac4ecace042 100644
--- a/compiler/rustc_feature/src/active.rs
+++ b/compiler/rustc_feature/src/active.rs
@@ -629,9 +629,6 @@ declare_features! (
     /// Allows macro attributes to observe output of `#[derive]`.
     (active, macro_attributes_in_derive_output, "1.51.0", Some(81119), None),
 
-    /// Allows the use of type alias impl trait in function return positions
-    (active, min_type_alias_impl_trait, "1.52.0", Some(63063), None),
-
     /// Allows associated types in inherent impls.
     (incomplete, inherent_associated_types, "1.52.0", Some(8995), None),
 
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs
index 1e053a56ff4..0aa7e82c204 100644
--- a/compiler/rustc_feature/src/removed.rs
+++ b/compiler/rustc_feature/src/removed.rs
@@ -152,6 +152,10 @@ declare_features! (
     (removed, impl_trait_in_bindings, "1.55.0", Some(63065), None,
      Some("the implementation was not maintainable, the feature may get reintroduced once the current refactorings are done")),
 
+    /// Allows the use of type alias impl trait in function return positions
+    (removed, min_type_alias_impl_trait, "1.55.0", Some(63063), None,
+     Some("removed in favor of full type_alias_impl_trait")),
+
     // -------------------------------------------------------------------------
     // feature-group-end: removed features
     // -------------------------------------------------------------------------
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 c87f1f4f00d..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(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(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(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(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(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(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(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(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(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(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(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`.