about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-20 23:44:59 -0400
committerGitHub <noreply@github.com>2017-03-20 23:44:59 -0400
commit17656ab328b641605f671a8a1ae1cc2de0638bfb (patch)
tree9539dfd97f4d2ea81d62e9e2633669bdb445cd56 /src/libsyntax
parent03235ccbfeca05f03588827a186465170fc9aad8 (diff)
parent60c1c961c73cd347e389d7961a7ba82396103029 (diff)
downloadrust-17656ab328b641605f671a8a1ae1cc2de0638bfb.tar.gz
rust-17656ab328b641605f671a8a1ae1cc2de0638bfb.zip
Rollup merge of #40556 - cramertj:stabilize-pub-restricted, r=petrochenkov
Stabilize pub(restricted)

Fix https://github.com/rust-lang/rust/issues/32409
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d07069d030a..7af432176cf 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)),
 
@@ -409,6 +406,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
@@ -1417,17 +1417,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() {