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

@ -42,6 +42,7 @@ pub fn check_attr(psess: &ParseSess, attr: &Attribute) {
pub fn parse_meta<'a>(psess: &'a ParseSess, attr: &Attribute) -> PResult<'a, MetaItem> {
let item = attr.get_normal_item();
Ok(MetaItem {
unsafety: item.unsafety,
span: attr.span,
path: item.path.clone(),
kind: match &item.args {