From 00920c0024860cec91b71a8a1fe57d1af37938f9 Mon Sep 17 00:00:00 2001 From: Jakub Kozlowski Date: Wed, 15 Aug 2018 00:24:55 +0100 Subject: Stabilize macro_vis_matcher --- src/libsyntax/ext/tt/macro_rules.rs | 14 +------------- src/libsyntax/feature_gate.rs | 8 ++------ 2 files changed, 3 insertions(+), 19 deletions(-) (limited to 'src/libsyntax') 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"; -- cgit 1.4.1-3-g733a5