Parse unsafe attributes
This commit is contained in:
parent
76e7a0849c
commit
67f5dd1ef1
19 changed files with 173 additions and 27 deletions
|
@ -1801,6 +1801,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
let attr = attr::mk_attr_nested_word(
|
||||
&self.tcx.sess.psess.attr_id_generator,
|
||||
AttrStyle::Outer,
|
||||
Unsafe::No,
|
||||
sym::allow,
|
||||
sym::unreachable_code,
|
||||
self.lower_span(span),
|
||||
|
|
|
@ -911,6 +911,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
|||
let kind = match attr.kind {
|
||||
AttrKind::Normal(ref normal) => AttrKind::Normal(P(NormalAttr {
|
||||
item: AttrItem {
|
||||
unsafety: normal.item.unsafety,
|
||||
path: normal.item.path.clone(),
|
||||
args: self.lower_attr_args(&normal.item.args),
|
||||
tokens: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue