@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user