General MetaItem encapsulation rewrites.

This commit is contained in:
cgswords
2016-07-15 13:13:17 -07:00
parent 9316ae515e
commit a5e5ea1646
14 changed files with 231 additions and 170 deletions

View File

@@ -302,9 +302,8 @@ fn contains_macro_use(fld: &mut MacroExpander, attrs: &[ast::Attribute]) -> bool
};
if is_use {
match attr.node.value.node {
ast::MetaItemKind::Word(..) => (),
_ => fld.cx.span_err(attr.span, "arguments to macro_use are not allowed here"),
if !attr.is_word() {
fld.cx.span_err(attr.span, "arguments to macro_use are not allowed here");
}
return true;
}