Create a rustc_ast representation for parsed attributes
This commit is contained in:
parent
da476f1942
commit
03fb7eeced
11 changed files with 115 additions and 48 deletions
|
|
@ -813,10 +813,10 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
};
|
||||
let attr_item = attr.get_normal_item();
|
||||
let safety = attr_item.unsafety;
|
||||
if let AttrArgs::Eq { .. } = attr_item.args {
|
||||
if let AttrArgs::Eq { .. } = attr_item.args.unparsed_ref().unwrap() {
|
||||
self.cx.dcx().emit_err(UnsupportedKeyValue { span });
|
||||
}
|
||||
let inner_tokens = attr_item.args.inner_tokens();
|
||||
let inner_tokens = attr_item.args.unparsed_ref().unwrap().inner_tokens();
|
||||
match expander.expand_with_safety(self.cx, safety, span, inner_tokens, tokens) {
|
||||
Ok(tok_result) => {
|
||||
let fragment = self.parse_ast_fragment(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue