about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorDaniele Baracchi <daniele.baracchi@gmail.com>2016-08-24 13:07:43 +0200
committerDaniele Baracchi <daniele.baracchi@gmail.com>2016-08-26 17:27:20 +0200
commitee055a1ff37bb47f32ed460ca7d249d91f8cbe7d (patch)
tree57afce5e8c95d631e60009388811645d3d496f8b /src/libsyntax
parenteaf71f8d1034f16140791f566cab3f3c9a0bf96a (diff)
downloadrust-ee055a1ff37bb47f32ed460ca7d249d91f8cbe7d.tar.gz
rust-ee055a1ff37bb47f32ed460ca7d249d91f8cbe7d.zip
Stabilize type-macros
Closes #27245
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/expand.rs13
-rw-r--r--src/libsyntax/feature_gate.rs5
2 files changed, 3 insertions, 15 deletions
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index 031d9a2d3f4..26599208ec0 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -491,18 +491,7 @@ fn expand_trait_item(ti: ast::TraitItem, fld: &mut MacroExpander)
 pub fn expand_type(t: P<ast::Ty>, fld: &mut MacroExpander) -> P<ast::Ty> {
     let t = match t.node.clone() {
         ast::TyKind::Mac(mac) => {
-            if fld.cx.ecfg.features.unwrap().type_macros {
-                expand_mac_invoc(mac, None, Vec::new(), t.span, fld)
-            } else {
-                feature_gate::emit_feature_err(
-                    &fld.cx.parse_sess.span_diagnostic,
-                    "type_macros",
-                    t.span,
-                    feature_gate::GateIssue::Language,
-                    "type macros are experimental");
-
-                DummyResult::raw_ty(t.span)
-            }
+            expand_mac_invoc(mac, None, Vec::new(), t.span, fld)
         }
         _ => t
     };
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index d746f8e2114..dc68e064634 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -213,9 +213,6 @@ declare_features! (
     // Allows associated type defaults
     (active, associated_type_defaults, "1.2.0", Some(29661)),
 
-    // Allows macros to appear in the type position.
-    (active, type_macros, "1.3.0", Some(27245)),
-
     // allow `repr(simd)`, and importing the various simd intrinsics
     (active, repr_simd, "1.4.0", Some(27731)),
 
@@ -321,6 +318,8 @@ declare_features! (
     // mean anything
     (accepted, test_accepted_feature, "1.0.0", None),
     (accepted, tuple_indexing, "1.0.0", None),
+    // Allows macros to appear in the type position.
+    (accepted, type_macros, "1.13.0", Some(27245)),
     (accepted, while_let, "1.0.0", None),
     // Allows `#[deprecated]` attribute
     (accepted, deprecated, "1.9.0", Some(29935))