about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-04-28 03:32:12 +0800
committerGitHub <noreply@github.com>2018-04-28 03:32:12 +0800
commit8b36d9abaa8d8950a74f57ce53e2483902579959 (patch)
treecdba4ba67a2dd1a48a3371a134966f307e26e60d /src/libsyntax
parenta18e7a6e837eba07dcd64fc0d3ea79ac2bab01cc (diff)
parentb5c7cbf2f288967f55f8155a1ded7379ee4161f0 (diff)
downloadrust-8b36d9abaa8d8950a74f57ce53e2483902579959.tar.gz
rust-8b36d9abaa8d8950a74f57ce53e2483902579959.zip
Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakis
Stabilize dyn trait

This PR stabilizes RFC 2113. I followed the [stabilization guide](https://forge.rust-lang.org/stabilization-guide.html).

Related issue: https://github.com/rust-lang/rust/issues/49218
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 0331e90164f..a4a83712a08 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -375,9 +375,6 @@ declare_features! (
     // Future-proofing enums/structs with #[non_exhaustive] attribute (RFC 2008)
     (active, non_exhaustive, "1.22.0", Some(44109), None),
 
-    // Trait object syntax with `dyn` prefix
-    (active, dyn_trait, "1.22.0", Some(44662), Some(Edition::Edition2018)),
-
     // `crate` as visibility modifier, synonymous to `pub(crate)`
     (active, crate_visibility_modifier, "1.23.0", Some(45388), Some(Edition::Edition2018)),
 
@@ -592,6 +589,8 @@ declare_features! (
     (accepted, cfg_target_feature, "1.27.0", Some(29717), None),
     // Allows #[target_feature(...)]
     (accepted, target_feature, "1.27.0", None, None),
+    // Trait object syntax with `dyn` prefix
+    (accepted, dyn_trait, "1.27.0", Some(44662), None),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1657,10 +1656,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> {
                 gate_feature_post!(&self, never_type, ty.span,
                                    "The `!` type is experimental");
             }
-            ast::TyKind::TraitObject(_, ast::TraitObjectSyntax::Dyn) => {
-                gate_feature_post!(&self, dyn_trait, ty.span,
-                                   "`dyn Trait` syntax is unstable");
-            }
             _ => {}
         }
         visit::walk_ty(self, ty)