about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorJakub Kozlowski <mail@jakub-kozlowski.com>2018-08-15 00:24:55 +0100
committerJakub Kozlowski <mail@jakub-kozlowski.com>2018-08-19 17:08:00 +0100
commit00920c0024860cec91b71a8a1fe57d1af37938f9 (patch)
tree8338da004d3412c100b2c11f32c6c7fb0e0f4af6 /src/libsyntax
parentb355906919927ab3c879becd14392f023af883a1 (diff)
downloadrust-00920c0024860cec91b71a8a1fe57d1af37938f9.tar.gz
rust-00920c0024860cec91b71a8a1fe57d1af37938f9.zip
Stabilize macro_vis_matcher
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs14
-rw-r--r--src/libsyntax/feature_gate.rs8
2 files changed, 3 insertions, 19 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index 770561fe326..2c738ac2a04 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -964,7 +964,7 @@ fn is_legal_fragment_specifier(sess: &ParseSess,
                                frag_span: Span) -> bool {
     match frag_name {
         "item" | "block" | "stmt" | "expr" | "pat" | "lifetime" |
-        "path" | "ty" | "ident" | "meta" | "tt" | "" => true,
+        "path" | "ty" | "ident" | "meta" | "tt" | "vis" | "" => true,
         "literal" => {
             if !features.macro_literal_matcher &&
                !attr::contains_name(attrs, "allow_internal_unstable") {
@@ -977,18 +977,6 @@ fn is_legal_fragment_specifier(sess: &ParseSess,
             }
             true
         },
-        "vis" => {
-            if !features.macro_vis_matcher &&
-               !attr::contains_name(attrs, "allow_internal_unstable") {
-                let explain = feature_gate::EXPLAIN_VIS_MATCHER;
-                emit_feature_err(sess,
-                                 "macro_vis_matcher",
-                                 frag_span,
-                                 GateIssue::Language,
-                                 explain);
-            }
-            true
-        },
         _ => false,
     }
 }
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index e8245a553eb..9e80564f579 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -342,9 +342,6 @@ declare_features! (
     // Allows overlapping impls of marker traits
     (active, overlapping_marker_traits, "1.18.0", Some(29864), None),
 
-    // Allows use of the :vis macro fragment specifier
-    (active, macro_vis_matcher, "1.18.0", Some(41022), None),
-
     // rustc internal
     (active, abi_thiscall, "1.19.0", None, None),
 
@@ -648,6 +645,8 @@ declare_features! (
     (accepted, repr_transparent, "1.28.0", Some(43036), None),
     // Defining procedural macros in `proc-macro` crates
     (accepted, proc_macro, "1.29.0", Some(38356), None),
+    // Allows use of the :vis macro fragment specifier
+    (accepted, macro_vis_matcher, "1.29.0", Some(41022), None),
     // Allows importing and reexporting macros with `use`,
     // enables macro modularization in general.
     (accepted, use_extern_macros, "1.30.0", Some(35896), None),
@@ -1363,9 +1362,6 @@ pub const EXPLAIN_DEPR_CUSTOM_DERIVE: &'static str =
 pub const EXPLAIN_DERIVE_UNDERSCORE: &'static str =
     "attributes of the form `#[derive_*]` are reserved for the compiler";
 
-pub const EXPLAIN_VIS_MATCHER: &'static str =
-    ":vis fragment specifier is experimental and subject to change";
-
 pub const EXPLAIN_LITERAL_MATCHER: &'static str =
     ":literal fragment specifier is experimental and subject to change";