]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/feature_gate.rs
remove associated_consts feature gate
[rust.git] / src / libsyntax / feature_gate.rs
index cb625b1ac066e4d0f6d5c9f248b399ac46279fca..9adba7f50ccaf3aca50684243987e097980b6842 100644 (file)
@@ -198,10 +198,6 @@ pub fn new() -> Features {
     // #23121. Array patterns have some hazards yet.
     (active, slice_patterns, "1.0.0", Some(23121)),
 
-    // Allows the definition of associated constants in `trait` or `impl`
-    // blocks.
-    (active, associated_consts, "1.0.0", Some(29646)),
-
     // Allows the definition of `const fn` functions.
     (active, const_fn, "1.2.0", Some(24111)),
 
@@ -446,6 +442,9 @@ pub fn new() -> Features {
     (accepted, closure_to_fn_coercion, "1.19.0", Some(39817)),
     // Allows attributes on struct literal fields.
     (accepted, struct_field_attributes, "1.20.0", Some(38814)),
+    // Allows the definition of associated constants in `trait` or `impl`
+    // blocks.
+    (accepted, associated_consts, "1.20.0", Some(29646)),
 );
 
 // If you change this, please modify src/doc/unstable-book as well. You must
@@ -1405,11 +1404,6 @@ fn visit_fn(&mut self,
 
     fn visit_trait_item(&mut self, ti: &'a ast::TraitItem) {
         match ti.node {
-            ast::TraitItemKind::Const(..) => {
-                gate_feature_post!(&self, associated_consts,
-                                  ti.span,
-                                  "associated constants are experimental")
-            }
             ast::TraitItemKind::Method(ref sig, ref block) => {
                 if block.is_none() {
                     self.check_abi(sig.abi, ti.span);
@@ -1435,11 +1429,6 @@ fn visit_impl_item(&mut self, ii: &'a ast::ImplItem) {
         }
 
         match ii.node {
-            ast::ImplItemKind::Const(..) => {
-                gate_feature_post!(&self, associated_consts,
-                                  ii.span,
-                                  "associated constants are experimental")
-            }
             ast::ImplItemKind::Method(ref sig, _) => {
                 if sig.constness.node == ast::Constness::Const {
                     gate_feature_post!(&self, const_fn, ii.span, "const fn is unstable");