about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorChristopher Vittal <christopher.vittal@gmail.com>2017-11-10 12:58:52 -0500
committerChristopher Vittal <christopher.vittal@gmail.com>2017-11-15 15:46:01 -0500
commitbdff9463a0afbbdcd52825ead6b6f9f1245652db (patch)
treec0fe98cd7611f0311268b9392a786e5990f0e21b /src/libsyntax
parent109f2dd36b38d0642246ad50101bba21f5c0fba9 (diff)
downloadrust-bdff9463a0afbbdcd52825ead6b6f9f1245652db.tar.gz
rust-bdff9463a0afbbdcd52825ead6b6f9f1245652db.zip
Add universal_impl_trait feature gate
Move feature gate check to inside HIR lowering. Change error messages
and update tests.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index b6cb3ac1308..97eec3a21e9 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -275,6 +275,9 @@ declare_features! (
     // Allows `impl Trait` in function return types.
     (active, conservative_impl_trait, "1.12.0", Some(34511)),
 
+    // Allows `impl Trait` in function arguments.
+    (active, universal_impl_trait, "1.23.0", Some(34511)),
+
     // The `!` type
     (active, never_type, "1.13.0", Some(35121)),
 
@@ -1451,10 +1454,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
             ast::TyKind::BareFn(ref bare_fn_ty) => {
                 self.check_abi(bare_fn_ty.abi, ty.span);
             }
-            ast::TyKind::ImplTrait(..) => {
-                gate_feature_post!(&self, conservative_impl_trait, ty.span,
-                                   "`impl Trait` is experimental");
-            }
             ast::TyKind::Never => {
                 gate_feature_post!(&self, never_type, ty.span,
                                    "The `!` type is experimental");