From 28626ca5b1228f283fbc7c85d88cf897c7750267 Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Wed, 15 Mar 2017 14:24:02 -0700 Subject: Stabilize pub(restricted) --- src/libsyntax/feature_gate.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 15913d56d16..5eb9366fb2f 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -260,9 +260,6 @@ declare_features! ( // impl specialization (RFC 1210) (active, specialization, "1.7.0", Some(31844)), - // pub(restricted) visibilities (RFC 1422) - (active, pub_restricted, "1.9.0", Some(32409)), - // Allow Drop types in statics/const functions (RFC 1440) (active, drop_types_in_const, "1.9.0", Some(33156)), @@ -406,6 +403,9 @@ declare_features! ( (accepted, field_init_shorthand, "1.17.0", Some(37340)), // Allows the definition recursive static items. (accepted, static_recursion, "1.17.0", Some(29719)), + // pub(restricted) visibilities (RFC 1422) + (accepted, pub_restricted, "1.17.0", Some(32409)), + ); // If you change this, please modify src/doc/unstable-book as well. You must // move that documentation into the relevant place in the other docs, and @@ -1410,17 +1410,6 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { visit::walk_impl_item(self, ii); } - fn visit_vis(&mut self, vis: &'a ast::Visibility) { - let span = match *vis { - ast::Visibility::Crate(span) => span, - ast::Visibility::Restricted { ref path, .. } => path.span, - _ => return, - }; - gate_feature_post!(&self, pub_restricted, span, "`pub(restricted)` syntax is experimental"); - - visit::walk_vis(self, vis) - } - fn visit_generics(&mut self, g: &'a ast::Generics) { for t in &g.ty_params { if !t.attrs.is_empty() { -- cgit 1.4.1-3-g733a5