1
Fork 0

Parse unsafe attributes

This commit is contained in:
carbotaniuman 2024-04-20 23:54:50 -05:00
parent 76e7a0849c
commit 67f5dd1ef1
19 changed files with 173 additions and 27 deletions

View file

@ -778,7 +778,13 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
if let SyntaxExtensionKind::Derive(..) = ext {
self.gate_proc_macro_input(&item);
}
let meta = ast::MetaItem { kind: MetaItemKind::Word, span, path };
// FIX THIS LATER
let meta = ast::MetaItem {
unsafety: ast::Unsafe::No,
kind: MetaItemKind::Word,
span,
path,
};
let items = match expander.expand(self.cx, span, &meta, item, is_const) {
ExpandResult::Ready(items) => items,
ExpandResult::Retry(item) => {