Stabilize type-macros

Closes #27245
This commit is contained in:
Daniele Baracchi
2016-08-24 13:07:43 +02:00
parent eaf71f8d10
commit ee055a1ff3
14 changed files with 9 additions and 54 deletions

View File

@@ -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
};